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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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