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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kraghavcd
Helper I
Helper I

Wrong Sum Calculation of a Column in a table chart

Hello,

 

The vPQ QTD% column of the below table has a wrong sum calculation. The total when calculated should be +60%, but I am getting it as -60%. Please help! Thank you

 

Table.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @kraghavcd ,

In this case -60% is the correct answer why would you expect +60%?

A sum of % does not work in this case since it's a weighed calculation.

(-139377 / 231253 = -0,6)

If you for some reason want to see the sum of % please provide me with some data.

 

The measure would look something like:

SUMX(SUMMARIZE('Table'; 'table'[Column]; "% Calc"; vPQ QTD%/ Approved PQ_Amount);[% Calc]))

 

Kind regards
Joren Venema

Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily. 

View solution in original post

2 REPLIES 2
kentyler
Solution Sage
Solution Sage

Usually I have problems like this when I forget that the "Total" is not calculated in Power BI by adding up the values in the all the rows..... but by apply the measure doing the calculation in the context of the last line only TotalInContext.png

So often you have to alter the measure so that it will work when it is not in the context of a single line of your data.
If you post a sample of the measure you're using we can take a look.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Anonymous
Not applicable

Hello @kraghavcd ,

In this case -60% is the correct answer why would you expect +60%?

A sum of % does not work in this case since it's a weighed calculation.

(-139377 / 231253 = -0,6)

If you for some reason want to see the sum of % please provide me with some data.

 

The measure would look something like:

SUMX(SUMMARIZE('Table'; 'table'[Column]; "% Calc"; vPQ QTD%/ Approved PQ_Amount);[% Calc]))

 

Kind regards
Joren Venema

Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.