Forum Discussion
hcova7
1 year agoFrequent Visitor
How to modify some DAX measures to solve a Running Total problem
Dear sirs, Please your help for the following DAX measure problem. I have the following Excel pivot table: This Pivot Table is built from the following table called "Systems" ...
- 1 year ago
hcova7
Please try with this measure:RTotal_6 := VAR _CurrentDate = MAX( 'Calendar'[Date] ) VAR _StartDate = CALCULATE( MIN( 'Calendar'[Date] ); ALLSELECTED( 'Calendar' ) ) VAR _EndDate = CALCULATE( MAX( 'Calendar'[Date] ); ALLSELECTED( 'Calendar' ) ) VAR _Range = DATESBETWEEN( 'Calendar'[Date]; _StartDate; _CurrentDate ) VAR _RunningTotal = CALCULATE( SUMX( System; 'System'[ProfitUSD] ); _Range ) RETURN _RunningTotalI hope this help, if so please mark as a solution. Kudos are welcome😀
lbendlin
Super User
1 year agoYou can use a calendar table, and then create a quick measure for the running total
hcova7
1 year agoFrequent Visitor
Hi Ibendlin.
The problem is that in my data table there months without any profit. So the measure I need must ensure that the running total doesn´t skip any month. I mean, for months with no profit, the running total must remain unchanged, "carrying forward" the previous total or the last calculated running total.
My DAX measure calculates a wrong running total after a months without no profit data.
- lbendlin1 year ago
Super User
Have you checked the Quick Measure? It seems to work as you need it to, showing the right number for each time interval.