I solved the initial challenge and got the Top and Bottom 5 customers to work, but I played around with Ranking and wanted to show:
The Ranking within the Context (Year, Month) for the Top and Bottom 5.
The total Ranking regardless of Context for the Top and Bottom 5.
What I am having issues with is that I canât get only the Top or Bottom 5 to show in the Total Ranking column. That column brings inn all of the customers.
What I want is for the âCustomer Rank Totalâ to only bring in the Top or Bottom 5, and show their total ranking like this:
How do I do that? I have tried a few different ways, but I either get ERROR (The measure doesnât work), I get â1â back for all and maybe another error.
Anyone know how I can make it work like I want to?
In order to achieve the results based on the scenario that youâve provided. Write the DAX measure as provided below alongwith the screenshot of the final results attched for the reference -
I am still struggling a bit with understanding the Context. I am where I starting to sort of understand it in my own head, but I would not be able to explain to to someone else easily written and verbally in a confident way.
So the IF checks:
NOT ISBLANK([Customer Ranking Rank] ) checks that the Customer is ranked within the filters (Year, Month and Top 5, Bottom 5 or All)
ISINSCOPE(Customers[Customer Names]) is the one I am struggling the most with understanding. From what I understand this function returns TRUE for all customers returned within the filters selected. Basically it says âDo these customers exists within the filtersâ?"
And then the CALCULATION function does the ranking calculation for those customers returned after filtering.
Is this correctly understood?
DAX code hidden so the post doesn't become too long