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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Mareias
Frequent Visitor

Sum of a calculated measure column

Hello,

 

I have a table like the one below, where I have created the column Dif and DIf*Vol. However, when I try to see the total of the column Dif*Vol, it doesnt show the grand total. Instead, he does the same calculation as the other lines. All I want is to have a big number showing the real difference.

 

Important to note: The B column is a calculated measure and therefore is dynamic. Therefore, I cant edit the data source and do it directly in the database.

 

SourceAB (Calc Measure)VolumeDif (A-B)Dif *Vol
Z110010703030900
Y110010803020600
M110010903010300
N110010903010300
J11001000301003000
 5500533015017025500

 

The red number should be 5100 - the sum of the lines above.

 

The ideal scenario was to calculate this column directly in the database instead of creating a calculated measure. However, the B column is dynamic and can be changed based on a parameter table. 

 

How can I do that?

 

Thank you.

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hello @Mareias

 

You should use SUMX to iterate over Source and sum the values of Dif*Vol.

Try creating a measure that looks something like this:

=
SUMX ( 
    VALUES ( YourTable[Source] ),
    [Dif*Vol]
)

I'm assuming [Dif*Vol] is a measure. You could also replace [Dif*Vol] with the components of the calculation as long as they are measures (or wrapped in CALCULATE).

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

1 REPLY 1
OwenAuger
Super User
Super User

Hello @Mareias

 

You should use SUMX to iterate over Source and sum the values of Dif*Vol.

Try creating a measure that looks something like this:

=
SUMX ( 
    VALUES ( YourTable[Source] ),
    [Dif*Vol]
)

I'm assuming [Dif*Vol] is a measure. You could also replace [Dif*Vol] with the components of the calculation as long as they are measures (or wrapped in CALCULATE).

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors