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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Larsv
Frequent Visitor

Subtotal of measure

Hi PowerBI Community,

 

I'm new here and exploring PowerBI for creating measures and subtotals. Please excuse any grammatical errors, as English is not my first language.

 

I'm facing a challenge with subtotaling in PowerBI. I have a measure that calculates data using a switch function to alternate between three different calculations: one for actual data, one for predictions based on existing data, and one for planned values.

 

This measure is then used in a diagram, as shown in the attached screenshot.

Larsv_1-1708612523842.png

 

My objective is to create a new measure that cumulatively sums these calculated values for each month. For example, I'd like the cumulative value to be -59 in January, then increase to 100 by February, continuing in this manner.

Is it possible to achieve this cumulative sum using the existing measure as the basis, rather than directly using the raw data behind the measure's formula?

3 REPLIES 3
Anonymous
Not applicable

Hi @Larsv ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1708655523512.png

 

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous,

Thank you for your reply. Unfortunately, I do not have a column where the values are stored. The values are calculated using three measures, which I then switch through for my condition.

I want to add up these measures.

Thank you.

Regards, Lars

Greg_Deckler
Super User
Super User

@Larsv This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.

 

You could maybe use this along with your measure:

Better Running Total - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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