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
aditya_kamdi
Frequent Visitor

Calculating Percentages of Totals and Row level correctly

I have been trying to calculate the percentage for Sales achieved in " Target%". However, I can either get the percentages to calculate accurately either at every row-level or at the grand total correctly.

I have two values 'Net Sales This Year'[Net Amount] and 'Project Details'[Hong Kong Target Calculation.amount] and the Percentage can be obtained by dividing  'Net Sales This Year' with [Hong Kong Target Calculation.amount]. There are 2 summary levels one is project and other is a state. 

If I use RELATED I get it right at Project Level i.e the lowest level of summary and not at the state and grand total level 

Formula: 

Target % = DIVIDE('Net Sales This Year'[Net Amount], RELATED('Project Details'[Hong Kong Target Calculation.amount]), 0 )

 

tempsnip 2.png

 

If I use SUMX I get the Grand Total right but the summary levels are just wrong

Formula: 

Target % =

DIVIDE('Net Sales This Year'[Net Amount], SUMX('Project Details','Project Details'[Hong Kong Target Calculation.amount]), 0 )

 

tempsnip.png

 

 

 

 

 

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi aditya_kamdi,

It seems that you use calculated column in Matrix, right? I am not sure your data structure, you could try to use measure like below

SUM('Table'[amount])/SUM(t2[target])

to see whether it work or not. In addition, if your data structure is not similar to my and the measure doesn't work, please inform me more detailed information(such as your sample data and your expected output)? Then I will help you more correctly.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
dax
Community Support
Community Support

Hi aditya_kamdi,

It seems that you use calculated column in Matrix, right? I am not sure your data structure, you could try to use measure like below

SUM('Table'[amount])/SUM(t2[target])

to see whether it work or not. In addition, if your data structure is not similar to my and the measure doesn't work, please inform me more detailed information(such as your sample data and your expected output)? Then I will help you more correctly.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors