Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
99 | |
68 | |
44 | |
37 | |
29 |
User | Count |
---|---|
156 | |
92 | |
62 | |
44 | |
41 |