Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rfranca
Resolver IV
Resolver IV

TOP N sales without zeros

 

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.

 

xRanking_Bt = rankx(ALL(dm_PRODUTO[NOME_PRODUTO]);[Mx_TotalValor];;ASC;Dense)

Clipboard01.gif

 

Thanks for help!

3 REPLIES 3
ccakjcrx
Resolver I
Resolver I

Hey @Rfranca!

 

@Interkoubessis on the right track. However, if you want to filter it out within the DAX expression, you'll need to post whether or not product sales information is in the same table as products. 

 

At that point, posting a link to your .pbix file would be helpful.

Interkoubess
Solution Sage
Solution Sage

Hi @Rfranca,

 

What about changing the filter condtion for the view (Matrix for example) and put the conditions different to zero.

Then you get the rank without the zero....

 

Let us know if it does not work....

 

Ninter

hi, @Interkoubess @ccakjcrx

 

 

If you use the view filter to not display the zeros, the ranking skips lines with zeros and displays something with 1,2,3,6,7,8,9,10 (4 and 5 are zeros).

And this way the display is incorrect.

 

I wanted to filter in DAX where the result will be a correct ranking.

I already researched bastabte and still have not found the solution.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.