Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Filter table based on values from other table

I am using this DAX meassure to calculate total sales

 

TotalSales = SUM(Sales[Amount])

 

 

and this ranking formula to rank the sales staff:

 

RankSalesStaff = RANKX(ALL('Sales'[Staff_ID]),'Sales'[TotalSales])

 

 

This works well if I need to rank all staff, however I would like to limit the dataset to be ranked based on values provided in another table.

 

For example, let's assume my sales table looks like this:

 

 

And the following values in another table:

 

How can I get the following reult by adjusting the above DAX functions?

Please note that I cannot use a slicer to achieve this, because I need my unfiltered slicer for other visuals.

12 Replies