Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
I am working on a Power BI dashboard with headcount data and NOT SALES, and I need help calculating cumulative change and cumulative % change when multiple months are selected in the slicer.
Here’s a sample of the data:
The dataset contains daily headcount data from 2019 to 2024.
I want to create a table matrix like this:
The table should show the cumulative change and cumulative % change, where the data is based on average headcount, and the slicer allows the selection of multiple months. I already have a measure to calculate average headcount when multiple months are selected.
Any insights or advice would be greatly appreciated!
Solved! Go to Solution.
Hi @Muska_Sukhija ,
Based on the description, creating the new table to calcualte average count.
Table 2 =
SUMMARIZE(
'Table',
'Table'[Year],
"AvgHecount", AVERAGE('Table'[Headcount])
)
Then, creating the index column in power query.
Creating new column to calculate the change.
Change in preivous year = IF('Table 2'[Index] = 1, 0, [AvgHecount] - LOOKUPVALUE('Table 2'[AvgHecount], [Index], [Index] - 1))
Creating the new measure to calculate cumulative change.
Cumulative change =
CALCULATE(
SUM('Table 2'[Change in preivous year]),
FILTER(ALL('Table 2'), 'Table 2'[Index] <= MAX('Table 2'[Index])
)
)
Besides, creating the new measure to calucalte %cumulative change and change the percentage format.
Cumulative change% = [Cumulative change] / 100
What's more, if you want to calculate cumulative, you need to use sum function. If you select multiple months, power bi cannot dynamically generate calculated columns based on slicer values. There would be no way to calculate the cumulative.
Solved: PowerBI Cumulative Total by Month within Year (Fin... - Microsoft Fabric Community
How to Calculate Cumulative Values with DAX - Microsoft Fabric Community
Solved: Cumulative sum of a column - Microsoft Fabric Community
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Muska_Sukhija ,
Based on the description, creating the new table to calcualte average count.
Table 2 =
SUMMARIZE(
'Table',
'Table'[Year],
"AvgHecount", AVERAGE('Table'[Headcount])
)
Then, creating the index column in power query.
Creating new column to calculate the change.
Change in preivous year = IF('Table 2'[Index] = 1, 0, [AvgHecount] - LOOKUPVALUE('Table 2'[AvgHecount], [Index], [Index] - 1))
Creating the new measure to calculate cumulative change.
Cumulative change =
CALCULATE(
SUM('Table 2'[Change in preivous year]),
FILTER(ALL('Table 2'), 'Table 2'[Index] <= MAX('Table 2'[Index])
)
)
Besides, creating the new measure to calucalte %cumulative change and change the percentage format.
Cumulative change% = [Cumulative change] / 100
What's more, if you want to calculate cumulative, you need to use sum function. If you select multiple months, power bi cannot dynamically generate calculated columns based on slicer values. There would be no way to calculate the cumulative.
Solved: PowerBI Cumulative Total by Month within Year (Fin... - Microsoft Fabric Community
How to Calculate Cumulative Values with DAX - Microsoft Fabric Community
Solved: Cumulative sum of a column - Microsoft Fabric Community
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
19 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
24 | |
10 | |
10 | |
9 | |
6 |