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.
I have a table like the following one, in which I calculate the cumulative sum of the price column using the EARLIEST function, something like this: sum = calculate (sum ('A' [price])) , FILTER ('A', [index] <= EARLIER ('A' [index])))
index | Store | Year | Month | product | price |
1 | 1 | 2021 | 1 | A | 8000 |
2 | 1 | 2021 | 2 | B | 1000 |
3 | 1 | 2021 | 3 | C | 5000 |
index | Store | Year | Month | product | price | sum |
1 | 1 | 2021 | 1 | A | 8000 | 8000 |
2 | 1 | 2021 | 2 | B | 1000 | 9000 |
3 | 1 | 2021 | 3 | C | 5000 | 14000 |
But now I will have more than one store and I need to reset the value of the sum every time the center is changed, is it possible to do it?
index | Store | Year | Month | product | price | sum |
1 | 1 | 2021 | 1 | A | 8000 | 8000 |
2 | 1 | 2021 | 2 | B | 1000 | 9000 |
3 | 1 | 2021 | 3 | C | 5000 | 14000 |
4 | 2 | 2021 | 1 | A | 1000 | 1000 |
5 | 2 | 2021 | 2 | B | 3000 | 4000 |
6 | 2 | 2021 | 3 | C | 5000 | 9000 |
Solved! Go to Solution.
Try like
calculate (sum ('A' [price])) , FILTER ('A', [index] <= EARLIER ('A' [index]) && [store] = EARLIER ('A' [store]) ))
Try like
calculate (sum ('A' [price])) , FILTER ('A', [index] <= EARLIER ('A' [index]) && [store] = EARLIER ('A' [store]) ))
Thanks, that helped me.!
User | Count |
---|---|
80 | |
76 | |
70 | |
69 | |
54 |
User | Count |
---|---|
104 | |
99 | |
92 | |
78 | |
69 |