The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello ,
I am trying to work on the rolling sum of the total headcoun,
Following is the dax query i have written
Estimate is the table name and i am counting the number of people added every month on a cummulative basis but it is not working
Kindly advice
Thank you
Solved! Go to Solution.
Hi @unknown_anony ,
Thanks for Greg_Deckler reply.
Here is a measure you can try
rolling total =
IF(
'Table'[Value] = 0,
0,
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[Date] <= EARLIER('Table'[Date])
)
)
)
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @unknown_anony ,
Thanks for Greg_Deckler reply.
Here is a measure you can try
rolling total =
IF(
'Table'[Value] = 0,
0,
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[Date] <= EARLIER('Table'[Date])
)
)
)
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@unknown_anony Try this but use SUMX instead of AVERAGEX: Better Rolling Average - Microsoft Fabric Community
i do want to average, i want to sum the headcounts monthly basis,
for ex:-
Old column new column
Jan 2024 - 16 Jan 2024 - 16
Feb 2024 - 0 Feb 2024 - 0
Mar 2024 - 2 Mar 2024 - 18
Apr 2024 - 4 Apr 2024 - 22
so on and so forth