March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
Solved! Go to Solution.
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:
hi, @ccakjcrx @gooranga1 @MarcelBeug @vanessa
Unfortunately it did not work out.
I am sending the file for better understanding.
Thank you for your help.
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.
You are welcome.
how to avoid zero values while ranking?
Hi,
That is what my formula suggested on Jan 18, 2018 should do. If it is not working as expected, then share some data, describe the question and show the expected result.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |