Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
How to calculate rolling/cummulative sum by date and category (in my case ID) ?
I have worker ID and date, need to get rolling for each employee.
Id | Date | Sale | Result |
1 | 20.10.2023 | 1 | 1 |
1 | 24.10.2023 | 2 | 3 |
1 | 10.11.2023 | 2 | 5 |
2 | 10.11.2023 | 2 | 2 |
2 | 11.11.2023 | 2 | 2 |
3 | 21.10.2023 | 1 | 1 |
Thank you
Marcin
Solved! Go to Solution.
Hi @Irek ,
Calculated Column:
C_Result = CALCULATE(SUM('Table'[Sale]),FILTER(ALLEXCEPT('Table','Table'[Id]),'Table'[Date]<=EARLIER('Table'[Date])))
Measure:
M_Result = CALCULATE(SUM('Table'[Sale]),FILTER(ALLEXCEPT('Table','Table'[Id]),'Table'[Date]<=MAX('Table'[Date])))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Irek ,
Calculated Column:
C_Result = CALCULATE(SUM('Table'[Sale]),FILTER(ALLEXCEPT('Table','Table'[Id]),'Table'[Date]<=EARLIER('Table'[Date])))
Measure:
M_Result = CALCULATE(SUM('Table'[Sale]),FILTER(ALLEXCEPT('Table','Table'[Id]),'Table'[Date]<=MAX('Table'[Date])))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi,
I figured the solution some time ago but yours also works very well, thank you.
Please use Quick Measures - they have examples for Rolling Totals.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
119 | |
78 | |
58 | |
52 | |
46 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |