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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Get total and subtotal right in measures

Hi,

 

I kindly need your help on this

 

So currently I have this display on my PowerBI table. To calculate the Amount 1 of candy, coffee, etc I already have a measure for that let's say the measure is called [Amount 1]

 

Let's say A, B is Category 1

Then Candy, Coffee, Biscuit are Brand

 

So if I only put Measure [Amount 1], I didn't get the subtotal and total correct.

 

Then in order to get the total and subtotal of A and B right, I have another measure using:

 

Amount 2 = if(HASONEVALUE(Table[Brand]), [Amount 1], sumx(values(Table[Brand]), [Amount 1]))


But after I display the amount 2, the subtotal of A & B is already correct, but the total is wrong.

 

What can I do about this? Thank you so much

GDENITA_1-1635090003074.png

 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this video.

(2) Power BI - Tales from the front #01 - Getting the Right Total - YouTube

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this video.

(2) Power BI - Tales from the front #01 - Getting the Right Total - YouTube

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Hi, this video is actually helping! Thank you so much

Jos_Woolley
Solution Sage
Solution Sage

Hi,

Can you share the definition of [Amount 1]? Also, can we see what the visual looks like with just [Amount 1], so that we can see the 'incorrect' subtotals and totals?

Regards

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.