cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rfranca Member
Member

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
Interkoubess Established Member
Established Member

Re: TOP N sales without zeros

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

ccakjcrx Member
Member

Re: TOP N sales without zeros

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.

Rfranca Member
Member

Re: TOP N sales without zeros

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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 236 members 2,251 guests
Please welcome our newest community members: