Forum Discussion
m_roussakis
Helper III
3 years agoCumulative Total on Line Y-Axis in bar/Line chart
I have a table as follows:
Table 'MC Total 2023'
Date Value Target
| Sunday, January 1, 2023 | $500 | $10,000 |
| Wednesday, February 1, 2023 | $500 | $10,000 |
| Wednesday, March 1, 2023 | $500 | $10,000 |
| Saturday, April 1, 2023 | $500 | $10,000 |
| Monday, May 1, 2023 | $500 | $10,000 |
| Thursday, June 1, 2023 | $500 | $10,000 |
| Saturday, July 1, 2023 | $500 | $10,000 |
| Tuesday, August 1, 2023 | $500 | $10,000 |
| Friday, September 1, 2023 | $500 | $10,000 |
| Sunday, October 1, 2023 | $1000 | $10,000 |
| Wednesday, November 1, 2023 | $3000 | $10,000 |
| Friday, December 1, 2023 | $3000 | $10,000 |
I want to plot the values from column 'Target' cumulatively for the 2023, like this, on the line Y-Axis:
I have managed to get it working using this DAX:
Cumulative Target =
VAR CurrentMonth = MAX('MC Total 2023'[Date])
RETURN
CALCULATE(
SUM('MC Total 2023'[Target]),
FILTER(
ALL('MC Total 2023'),
'MC Total 2023'[Date] <= CurrentMonth
)
)
The problem is I want to also plot November and December values. Each time I play around with the dax to do this my line ends up going horizontal.
Can anyone suggest a fix to get Nov and Dec populated ?
1 Reply
- lbendlin
Super User