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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Need a Dax to return % of top product

Hello,

I am putting together some dynamic text and need a Dax that will return the % that the top supplier makes up of total.

In the example below, I would want DAX to return 50%.

 

I need to show is 50% i.e. (25+25)/100 in the example below since supplier D is the highest of them all.
SupplierAmount
A20
B15
C15
D25
D25
  
Total100

 

I do have following measure in my report if that helps:

Actual Amount = ROUND(SUM('Transactions'[Amount]),2)

2 ACCEPTED SOLUTIONS

You can create a measure with below code 

 

Measure = 
var total_sum = CALCULATE(SUM(Supplier_data[Amount]),ALL(Supplier_data))
var getting_max =  MAXX(SUMMARIZE(ALL(Supplier_data),Supplier_data[Supplier],Supplier_data[Amount],"Max_Value",SUM(Supplier_data[Amount])/total_sum),[Max_Value])
return FORMAT(getting_max,"0%")

 

Samarth_18_0-1626448357324.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

Anonymous
Not applicable

This was helpful. I had to tweak the formula a little. Here was the final formula: 

 

% of highest Supplier = 
var total_supplier = CALCULATE([Actual Amount],'Find Suppliers - Addl Info'[Supplier]<>BLANK())
var getting_max =  MAXX(SUMMARIZE(FILTER('Fact Table','Fact Table'[Supplier ID]<>BLANK()),'Find Suppliers - Addl Info'[Supplier],"Max_Value",SUM('Fact Table'[GL Amount])/total_supplier),[Max_Value])
return 

FORMAT(getting_max,"0.0%")

 

 

View solution in original post

6 REPLIES 6
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

If i am taking it correctly you just need a highest % of total. You can take a Max of "% of total column" column.

 

Measure = MAX(Supplier_data[% of Total])

 

Samarth_18_0-1626444979788.png

Please let me know if this is the output you looking.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

@Samarth_18 I have editted my original question to be clearer.

I do not have % column.

You can create a measure with below code 

 

Measure = 
var total_sum = CALCULATE(SUM(Supplier_data[Amount]),ALL(Supplier_data))
var getting_max =  MAXX(SUMMARIZE(ALL(Supplier_data),Supplier_data[Supplier],Supplier_data[Amount],"Max_Value",SUM(Supplier_data[Amount])/total_sum),[Max_Value])
return FORMAT(getting_max,"0%")

 

Samarth_18_0-1626448357324.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

This was helpful. I had to tweak the formula a little. Here was the final formula: 

 

% of highest Supplier = 
var total_supplier = CALCULATE([Actual Amount],'Find Suppliers - Addl Info'[Supplier]<>BLANK())
var getting_max =  MAXX(SUMMARIZE(FILTER('Fact Table','Fact Table'[Supplier ID]<>BLANK()),'Find Suppliers - Addl Info'[Supplier],"Max_Value",SUM('Fact Table'[GL Amount])/total_supplier),[Max_Value])
return 

FORMAT(getting_max,"0.0%")

 

 

timg
Solution Sage
Solution Sage

Hi zzakir,

 

Is this the result you're looking for? It takes the % value of the top 1 supplier based on the [% of total] column.

 

TESTMEASURE = CALCULATE(SELECTEDVALUE(Test[% of Total]), TOPN(1,ALL(Test), Test[% of Total],DESC))

1.PNG

 

Best regards,

 

Tim





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hello @timg,
This is close to what I want. Perhaps I should've asked my original question differently:

I have a transaction table below.

 

I need to show is 50% i.e. (25+25)/100 in the example below in a card like you had 67% above.
SupplierAmount
A20
B15
C15
D25
D25
  
Total100

 

I do have following measure in my report if that helps:

Actual Amount = ROUND(SUM('Transactions'[Amount]),2)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.