title: Dense Rank with Case Statement
body: <p>When the <strong>Amount</strong> is greater than <code>120</code> and <code>Stage =W</code>, I want to rank based on the <strong>Amount</strong> and <strong>date</strong>.
  In the Screenshot <strong>&quot;first_120&quot;</strong> column is showing the correct ranking but starting from 3 as the first two rows have 120 and it doesn't meet the criteria. <strong>Is there a way to start the ranking from 1 instead of 3?</strong></p>
  <p><a href="https://i.stack.imgur.com/1qvLE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1qvLE.png" alt="enter image description here" /></a></p>
  <p>I am using the below <strong>calculation</strong></p>
  <pre class="lang-sql prettyprint-override"><code>case when Amount&gt;120 and stage='W' then
  dense_rank() over(partition by stage,owner order by Amount,date)  end as first_120
  </code></pre>