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

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

Reply
JohannB
Helper I
Helper I

Calculation of multiple subtotal %

Hi,

I am trying to show each % column to add up to 100%

Example:

Capture.JPG

 Thank you in advance

1 ACCEPTED SOLUTION

Hi @JohannB,

 

You are adding the values as a column, you need to do the exact same calculation but as a measure not a column as you can see below using the same formula on a column gives the 29% (this is making a row context and then adding it up) making it on a measure it will take into account the table context and give the correct results.

 

Please refer to this link to have additional information also look in Google "Calculated Columns vs Measures in PBI".

 

MEASURES_vs_COLUMNS_1.png

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @JohannB,

 

Can you share some sample data to test?
In addition, if you want to modify the total row calculation, you can add some conditions to filter on it.

 

For example:

7.PNG

 

Regards,

Xiaoxin Sheng

Thank you MFelix this resolves the issue. JohannB

MFelix
Super User
Super User

Hi @JohannB,

 

How are you calculating the % for each columns? It seems to me you are having a column with the % and the adding it to your visual is this it?

 

When you want to calculate over your context you need to use measures if you use the columns to make the %, averages whatever then when you add them to your visuals the context is at a row level and you will get the sum not the correct value.

 

You need to have a measure in order to calculate the % over the subtotals. something like this:

% Collection Obtained Measure =
IFERROR (
    SUM ( Payments[Collected to date] ) / SUM ( Payments[Personal Target] ),
    0
)

FInal result will be this:

 

MEASURES_vs_COLUMNS.png

 

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



I have tried the formula suggested but the result displayes a constant 29 % on all tyhe rows. The suntotals still rtemain a sum instead of a calculation. The equation used is: 

% Collection Obtained = IFERROR(SUM('Table 2'[Collected to date])/SUM('Table 2'[Personal Target]).0)

What I am looking for is what I had in Excel as displayed below.

Untitled.jpg

 

 

Hi @JohannB,

 

You are adding the values as a column, you need to do the exact same calculation but as a measure not a column as you can see below using the same formula on a column gives the 29% (this is making a row context and then adding it up) making it on a measure it will take into account the table context and give the correct results.

 

Please refer to this link to have additional information also look in Google "Calculated Columns vs Measures in PBI".

 

MEASURES_vs_COLUMNS_1.png

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.