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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
rfernandez
Regular Visitor

Cumulative graph

Hi,
I have this data 

TypePoRAmountMonth
AReal51
AReal42
AReal53
AReal84
AReal95
APlan21
APlan32
APlan63
APlan34
APlan75
BReal61
BReal72
BReal73
BReal74
BReal105
BPlan51
BPlan52
BPlan73
BPlan84
BPlan85

 

and im trying to create the following graph, that is a cumulative graph for type A and B (real-plan) for each month 

grpah.png

Thanks

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @rfernandez,

 

You can achieve this by creating the following measures:

 

Real-Plan = 
CALCULATE ( SUM ( Plan[Amount] ); Plan[PoR] = "Real" )
    - CALCULATE ( SUM ( Plan[Amount] ); Plan[PoR] = "Plan" )




Cumulative =
CALCULATE (
    SUMX ( Plan; [Real-Plan] );
    FILTER ( ALLSELECTED ( Plan[Month] ); Plan[Month] <= MAX ( Plan[Month] ) )
)

Then just use your cumulative measure on your charts.

 

cumulative.png

Although the ansewer by @AnkitBI is good, a good practice is to create a measure instead of calculated columns since they add size to your model and complexity.

 

This option works both for PBI and for Excel PowerPivot see attach both files with the solutions.

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my PBI file from here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
MFelix
Super User
Super User

Hi @rfernandez,

 

You can achieve this by creating the following measures:

 

Real-Plan = 
CALCULATE ( SUM ( Plan[Amount] ); Plan[PoR] = "Real" )
    - CALCULATE ( SUM ( Plan[Amount] ); Plan[PoR] = "Plan" )




Cumulative =
CALCULATE (
    SUMX ( Plan; [Real-Plan] );
    FILTER ( ALLSELECTED ( Plan[Month] ); Plan[Month] <= MAX ( Plan[Month] ) )
)

Then just use your cumulative measure on your charts.

 

cumulative.png

Although the ansewer by @AnkitBI is good, a good practice is to create a measure instead of calculated columns since they add size to your model and complexity.

 

This option works both for PBI and for Excel PowerPivot see attach both files with the solutions.

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





AnkitBI
Solution Sage
Solution Sage

Please find the PBIX PBIX. Hope this Helps. I am using Power Query to  get first 3 Output columns and a Calculated Column to get comulative value.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.