title: Combining filtering and Dynamic Ranking in Tableau
body: <p>My question is as follows: Suppose I have a data set where I have 4 fields</p>
  
  <ol>
  <li>Date</li>
  <li>Type</li>
  <li>Amount (metric 1)</li>
  <li>Sell Price (metric 2)</li>
  </ol>
  
  <p>These 4 fields are displayed in a table in my Tableau dashboard. When I click on any item in the table, I would like text at the top to display the <strong>rank of both of the metrics</strong> and the <strong>Unique count of the metrics</strong> in my table as well as their values. </p>
  
  <p>e.g. 'Amount = 32,500: Ranked 4 out of 342, Sell Price = $2.5: Ranked 2 out of 6' <em>(I only have 6 differing Sell prices)</em></p>
  
  <p>I would also like the implementation to be dynamic, so as when I filter on date, the result would adjust to suit e.g. 'Amount = 32,500: Ranked 1 out of 10, Sell Price = $2.5: Ranked 1 out of 4'</p>
  
  <p>I have tried using RANK function, but whenever I click on the a row in my table, it effectively filters out all of the other data and sets the rank to 1.</p>
  
  <p>Is there a way to do this?</p>