Forum Discussion
Line Charts with Cumulative values
- 9 years ago
Hi GaRaGe,
First, you should create a calculated column to get a number format month. If we use the Jan, Feb, Mar and so on. Month will order by alphabet.Month! = SWITCH(Test[Month],"Jan",1,"Feb",2,"Mar",3,"Apr",4,"May",5,"Jun",6,"Jul",7,"Aug",8,"Sep",9,"Oct",10,"Nov",11,12)
Then create two measure for cumulative spend over month.Target = CALCULATE(SUM(Test[Spend]),FILTER(ALL(Test),Test[Month!]<=MAX(Test[Month!])&&Test[Metric]="Target")) Actual = CALCULATE(SUM(Test[Spend]),FILTER(ALL(Test),Test[Month!]<=MAX(Test[Month!])&&Test[Metric]="Actual"))
Finally, create a line chart, select the [month!] field as axis, the two measures as value level.
Please feel free to ask if you any issue.
Best Regards,
Angelia
Hi,
Share some data and show the expected result in a simple table format.
The below image shows the values cumulating correctly but with the Fiscal Period on the X-Axis. Note the table is showing the correct details.
If i change the X-Axis to Month Name the Chart changes and is not cumulative.
- Ashish_Mathur5 years agoSuper User
Hi,
Share the link from where i can download your PBI file.
- BlueMan5 years agoFrequent Visitor
- Ashish_Mathur5 years agoSuper User
- SinatraB4 years agoFrequent Visitor
Hi, I have the same problem. If I send you the project could you help me?
- Ashish_Mathur4 years agoSuper User
Hi,
Share some data, describe the question and show the expected result.