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

Total and subtotal in hierarchy with max values

Hello everyone,
I have the following problem detailed in the picture. Subtotals are adjusted up to the month (December and November) but the Q4 (Trim 4)  subtotal must report the higher values of the December and November values (8,223,200.16 and not 14,864,9.04). can someone help me?

 

Thanks

 

Screenshot 2023-01-26 alle 09.21.03.png

2 REPLIES 2
MAwwad
Solution Sage
Solution Sage

 

To achieve this, you will need to create a new measure that calculates the maximum value for the Q4 subtotal. You can use the MAX() function in combination with the SUM() function to calculate this.

Here's an example of how you can create such a measure:

 

Copy code
Q4 Max = MAX( SUM( 'Table'[Value] ), FILTER( ALL( 'Table'[Date] ), 'Table'[Date].[Quarter] = MAX( 'Table'[Date].[Quarter] ) ) )
 

This measure will sum up the values for the current context and then return the maximum value for the current quarter.

Then you can use this measure in the table visual, instead of the original measure, to show the correct subtotal for Q4.

Please note that I assumed you have a date table and it is related to your table and the date column is named "Date" and the column you want to sum is named "value" and the quarter column is named "Quarter" you should adjust the formula accordingly.

Thanks for the answer, but it doesn't work, still have the same results. really I don't know..

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.