Forum Discussion
harry6810
2 years agoFrequent Visitor
Stacked chart
Hey,
How can I create a stacked chart where each subsequent data point represents the cumulative sum of the previous values?
Hi harry6810
You would need to create a cumulative measure
Culumative Amount = VAR MaxDate = MAX ( 'Date'[Date] ) RETURN CALCULATE ( [Sales Amount], /// Sum of the amountin your table or a count of an id 'Date'[Date] <= MaxDate, ALL ( Date ) )There are also a number of Time Intelligence measures you could use like
TOTALYTD = TOTALYTD([SalesAmount], 'Date'[Date]) TOTALQTD = TOTALQTD([SalesAmount], 'Date'[Date]) TOTALMTD = TOTALMTD([SalesAmount], 'Date'[Date])Hope this helps
Joe
1 Reply
- Joe_BarrySolution Sage
Hi harry6810
You would need to create a cumulative measure
Culumative Amount = VAR MaxDate = MAX ( 'Date'[Date] ) RETURN CALCULATE ( [Sales Amount], /// Sum of the amountin your table or a count of an id 'Date'[Date] <= MaxDate, ALL ( Date ) )There are also a number of Time Intelligence measures you could use like
TOTALYTD = TOTALYTD([SalesAmount], 'Date'[Date]) TOTALQTD = TOTALQTD([SalesAmount], 'Date'[Date]) TOTALMTD = TOTALMTD([SalesAmount], 'Date'[Date])Hope this helps
Joe