Forum Discussion
Cummulative SUM DAX ERROR
Hi,
I have issue DAX fomula with running total. I have done running total calculation in column F, what i have identify that my DAX formula is not populating same like manual calculation. Difference of running total i kept in column G.
help me understand where is the problem in my DAX.
I have updated excel file in below link
Below is the formula, i am using to get running total.
- Anonymous7 years ago
Sorry about that. Try this one:
Column = var __CurrentCreatedTime = Table2[CreatedTime] RETURN CALCULATE( SUM( Table2[Energy] ), FILTER( ALL( Table2 ), __CurrentCreatedTime >= Table2[CreatedTime] ) )Did a check, and looks like the new column is what you would want:
Also, be sure to set your data types in Power Query.
3 Replies
- AnonymousNot applicable
try this code for a calculated column:
Column = var __CurrentDay = Table2[NewDay] var __CurrentTime= Table2[TimeFactor] RETURN CALCULATE( SUM( Table2[Energy] ), FILTER( ALL( Table2 ), __CurrentDay >= Table2[NewDay] && __CurrentTime >= Table2[TimeFactor] ) )- kolturraHelper IV
Hi Anonymous ,
Thanks for your reply.
Whatever DAX which you have shared and i have created are showing same results but both the DAX fomulas shows same errors at one place. Below screenshot for your reference. Can you plesae help me on this.
Thanks,
K Raghavender Rao
- AnonymousNot applicable
Sorry about that. Try this one:
Column = var __CurrentCreatedTime = Table2[CreatedTime] RETURN CALCULATE( SUM( Table2[Energy] ), FILTER( ALL( Table2 ), __CurrentCreatedTime >= Table2[CreatedTime] ) )Did a check, and looks like the new column is what you would want:
Also, be sure to set your data types in Power Query.