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
Anonymous
Not applicable

Calculate the DISTRIBUTION the Top 10 products on VALUE

Hi,

 

I have a sales table that I have the TOP 10 selling products based on the VALUE. Now I want to calculate on the DISTRIBUTION on the same 10 products. 

 

I've got the ranking link this: TOP=RANKX(ALL(Table[product],value))

and then the TOP 10= CALCULATE([value], FILTER(table,[TOP]<=10))

 

This works fine, but I can not make it work with the DISTRIBUTION at the same time.

 

I did find it in this post: https://community.powerbi.com/t5/Desktop/How-to-calculate-top-10-highest-in-the-table-and-also-ranki...

 

Anyone that can help!

 

Br Kent

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , is something like this not working

% = divide( CALCULATE([value]), CALCULATE([value], FILTER(allselected(table),[TOP]<=10)))

 

Of you can use % of total , after right click on measure in the visual pane

Anonymous
Not applicable

Hi @amitchandak 

 

Well - I already have the distribution per Product in another column, and it is that column I want to take in based on the Value (top 10). I can make the TOP 10 products based on the value, buts it's when I change the Value with the Distribution it takes all distribution point...

First i make a RANK:

TOP = RANKX(ALL('Product'[ProdNr]),'Table'[Value])

 

Then I make a selection of that rank

TOP 10 SKU = CALCULATE('Table'[Value],FILTER('Table',[TOP]<=10)) -- is OK
TOP 10 SKU ver 2 = CALCULATE('Table'[Distribution],FILTER(ALLSELECTED('Table'),[TOP]<=10)) -- is NOT OK
 
Is there any way I can make that happen?
 
Thanks in advance!
 
K

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.