Forum Discussion
Ranking TOP N sales without zeros
- 8 years ago
Hi Rfranca,
Try this measure in the Mx_sales table
=RANKX(FILTER(All('PRODUCT'[ProductName]),[Ttotal_Sales]>0),[Ttotal_Sales],,ASC,Skip)
In the Visual level filters, apply a criteria on the Ttoal_Sales of >0
Hope this helps.
Hey Rfranca!
Try something like this:
MsrRankNo0 =
IF(
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:
- Rfranca8 years ago
Resolver IV
hi, ccakjcrx gooranga1 MarcelBeug vanessa
Unfortunately it did not work out.
I am sending the file for better understanding.Thank you for your help.
- Ashish_Mathur8 years ago
Super User
Hi Rfranca,
Try this measure in the Mx_sales table
=RANKX(FILTER(All('PRODUCT'[ProductName]),[Ttotal_Sales]>0),[Ttotal_Sales],,ASC,Skip)
In the Visual level filters, apply a criteria on the Ttoal_Sales of >0
Hope this helps.
- Rfranca8 years ago
Resolver IV