Forum Discussion
Anonymous
7 years agoNot applicable
Running Cumulative based on hours
I need your help on a DAX formula to calculate the third column 'CumulativeForTheDay' that's is required to be a running total. The required calculation will be for 24 hours starting at '01:...
Anonymous
7 years agoNot applicable
Hi Anonymous,
Can you please provide some sample data so that we can test and modify dax formula in power bi side?
Regards,
Xiaoxin Sheng
Anonymous
7 years agoNot applicable
Hello Xiaoxin,
Would you please share your email so I can send you a sample file as it looks like I can't upload it here.
Thanks,
Emad
- Anonymous7 years agoNot applicable
- Anonymous7 years agoNot applicable
Hi Anonymous,
I add a condition to summarize yesterday total on 12am, you can use following measure if it works for your requirement:
RunningTotal 2 = VAR currDate = MAX ( Daily_Methane_1[TimeStamp] ) RETURN IF ( TIMEVALUE ( currDate ) <> TIME(0,0,0), CALCULATE ( SUM ( Daily_Methane_1[FlowAtGivenInterval] ), FILTER ( ALLSELECTED ( Daily_Methane_1 ), AND ( Daily_Methane_1[TimeStamp] >= DATEVALUE ( currDate ), Daily_Methane_1[TimeStamp] < currDate ) ) ), CALCULATE ( SUM ( Daily_Methane_1[FlowAtGivenInterval] ) + 0, FILTER ( ALLSELECTED ( Daily_Methane_1 ), DATEVALUE ( Daily_Methane_1[TimeStamp] ) = DATEVALUE ( currDate ) - 1 ) ) )Regards,
Xiaoxin Sheng
- Anonymous7 years agoNot applicable
Many thanks in advance Xiaoxin, I'll test it and let you know.