March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
hi,
I'm trying to incremental summing my table's column value by it's datetime and group.
so far, I have created this dax code for it:
CALCULATE(SUM('my_table'[value]),FILTER('my_table'[type]='my_table'[type]&&'my_table'[datetime]<=EARLIER('my_table'[datetime])))
this code are doing the incrimental summing, but it won't sum my value data for each group that i have.
do anyone have idea where did my code went wrong?
or maybe another way to get the result that I want.
Solved! Go to Solution.
hi,
fixed my code and got the result that I want.
this is my final code, in case there are someon who has the same problem
column = CALCULATE(SUM('my_table'[value]),FILTER('my_table','my_table'[datetime]<=EARLIER('my_table'[datetime])&&'my_table'[type]=EARLIER(my_table[type])))
hi,
fixed my code and got the result that I want.
this is my final code, in case there are someon who has the same problem
column = CALCULATE(SUM('my_table'[value]),FILTER('my_table','my_table'[datetime]<=EARLIER('my_table'[datetime])&&'my_table'[type]=EARLIER(my_table[type])))
Hello @Anonymous
Give this a try:
Running Total = VAR MaxDate = MAX ( MyTable[DateTime] ) RETURN CALCULATE ( SUM ( MyTable[Value] ), ALL ( MyTable[DateTime] ), MyTable[DateTime] <= MaxDate )
hi @jdbuchanan71 ,
thank you for the code.
tried it on my side, but sadly it's not incrementally sum my value but only showing the exact same data as my value collumn
type | value | datetime | expected_result | result_from_my_code | result_from_your_code |
CR | 5 | 2019/04/01 0:00 | 5 | 15 | 5 |
CR | 5 | 2019/05/01 0:00 | 10 | 30 | 5 |
CR | 5 | 2019/06/01 0:00 | 15 | 45 | 5 |
KR | 6 | 2019/04/01 0:00 | 6 | 15 | 6 |
KR | 6 | 2019/05/01 0:00 | 12 | 30 | 6 |
KR | 6 | 2019/06/01 0:00 | 18 | 45 | 6 |
YR | 4 | 2019/04/01 0:00 | 4 | 15 | 4 |
YR | 4 | 2019/05/01 0:00 | 8 | 30 | 4 |
YR | 4 | 2019/06/01 0:00 | 12 | 45 | 4 |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |