I'm doing the sales rank, but when I set up the table for presentation the products that had sales with zero appear in the rank table, how do I mount the rank without the products with sales with zero.
Go to Solution.
Try this measure in the Mx_sales table
In the Visual level filters, apply a criteria on the Ttoal_Sales of >0
Hope this helps.
Try something like this:
CALCULATE(SUM(Sheet1[Sales])) <> 0,
RANKX(ALL(Sheet1),CALCULATE(SUM(Sheet1[Sales])),,1,Skip) - 1
You have to subtract 1 to get the rank to start at 1. The calculate expressions are necessary; otherwise, you will get 1s for your ranks. Here is how that turned out on my test data:
hi, @ccakjcrx @gooranga1 @MarcelBeug @vanessa
Unfortunately it did not work out.I am sending the file for better understanding.
Thank you for your help.
Many thanks, it worked!
I forgot the criterion of the visual level filter.
You are welcome.
Power BI Super User, Greg Deckler, explains
Register by September 5 to save $200
Engage and empower students with Power BI!
Continue your learning in our online communities.