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.
Hi,
I'm looking to calculate the rolling sum for the current and the last 4 rows , based on an ID column.
Any help please ?
Solved! Go to Solution.
@Anonymous , Column or measure
new column =
Sumx(filter((Table), Table[ID] <= earlier(Table[ID]) && Table[ID] >= earlier(Table[ID]) -4) , [sales] )
new measure =
Sumx(filter(allselected(Table), Table[ID] <= Max(Table[ID]) && Table[ID] >= max(Table[ID]) -4) , [sales] )
@Anonymous , Column or measure
new column =
Sumx(filter((Table), Table[ID] <= earlier(Table[ID]) && Table[ID] >= earlier(Table[ID]) -4) , [sales] )
new measure =
Sumx(filter(allselected(Table), Table[ID] <= Max(Table[ID]) && Table[ID] >= max(Table[ID]) -4) , [sales] )
Thankyou so much for this solution, it helps to resolved my issues.
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |