Forum Discussion
WalkerGBG
5 years agoFrequent Visitor
Cumulative Column based on month and Feature
Hi Very new still to PowerBI and Dax. I've been searching for a few days to work out how to get a Running Total (Cumulative) added to my data after loading Example below What I'm hoping you ca...
- 5 years ago
Hi,
This calculated column formula works as well
Running total = CALCULATE(SUM(Data[ImpactTime]),FILTER(Data,Data[Month]=EARLIER(Data[Month])&&Data[Feature]=EARLIER(Data[Feature])))Hope this helps.
vanessafvg
Community Champion
5 years agoyou can give this a try. you will need to create a date table if you dont have one
ie
date = calendarauto () (paste that into a new table)
for the new measure
running_total =
var mxdt = max('date'[Date])
var fstdt = min('date'[Date])
var lst = CALCULATE(max(cummulativetotal[Month]), REMOVEFILTERS())
var result = if(fstdt <= lst, CALCULATE(sum(cummulativetotal[ImpactTime]), 'date'[Date] <= lst)) return result