Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello.
I need to calculate the running cumulative of the column "Oil", but reset the calculation every time the column "Name" changes.
Note that the column "Date" is important also because the running sum is time-correlative.
My Data:
Date Name Oil
01/01/2000 M-1 210
01/02/2000 M-1 195
01/03/2000 M-1 266
01/04/2000 M-1 223
01/05/2000 M-1 190
01/06/2000 M-1 247
01/07/2000 M-1 233
01/08/2000 M-1 219
01/03/2002 M-2 197
01/04/2002 M-2 160
01/05/2002 M-2 180
01/06/2002 M-2 160
01/07/2002 M-2 156
01/03/2002 M-3 174
01/04/2002 M-3 177
01/05/2002 M-3 180
01/06/2002 M-3 169
01/07/2002 M-3 165
What I want to achieve:
Date Name Oil Oil_Cum
01/01/2000 M-1 210 210
01/02/2000 M-1 195 405
01/03/2000 M-1 266 671
01/04/2000 M-1 223 894
01/05/2000 M-1 190 1084
01/06/2000 M-1 247 1332
01/07/2000 M-1 233 1564
01/08/2000 M-1 219 1783
01/03/2002 M-2 197 197
01/04/2002 M-2 160 357
01/05/2002 M-2 180 537
01/06/2002 M-2 160 697
01/07/2002 M-2 156 853
01/03/2002 M-3 174 174
01/04/2002 M-3 177 352
01/05/2002 M-3 180 531
01/06/2002 M-3 169 700
01/07/2002 M-3 165 865
Any help would be greatly appreciated.
Best regards,
Solved! Go to Solution.
please try to create a column
Column = SUMX(FILTER('Table','Table'[Name]=EARLIER('Table'[Name])&&'Table'[Date]<=EARLIER('Table'[Date])),'Table'[Oil])
Proud to be a Super User!
@MarceloSaez , Try a new column like
cumm_oil = sumx(filter(Table,Table[Date] <= earlier(Table[Date]) && Table[name] =earlier(Table[name])),Table[Oil])
@MarceloSaez , Try a new column like
cumm_oil = sumx(filter(Table,Table[Date] <= earlier(Table[Date]) && Table[name] =earlier(Table[name])),Table[Oil])
please try to create a column
Column = SUMX(FILTER('Table','Table'[Name]=EARLIER('Table'[Name])&&'Table'[Date]<=EARLIER('Table'[Date])),'Table'[Oil])
Proud to be a Super User!
User | Count |
---|---|
85 | |
77 | |
72 | |
70 | |
55 |
User | Count |
---|---|
106 | |
96 | |
90 | |
79 | |
68 |