Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
grkanth81
Helper I
Helper I

help needed with cumulative of a measure

Hi all,

We are using Power BI Report Server (May 2025 version). I would like to get cumulative/running sum of a measure by period. 

Here is my sample test data:

Period table:

Period_integerFYPeriodper_begin_dateper_end_date
202401FY 2024Jul-231/07/202331/07/2023
202402FY 2024Aug-23

1/0

8/2023

31/08/2023
202403FY 2024Sep-231/09/202330/09/2023
202404FY 2024Oct-231/10/202331/10/2023
202405FY 2024Nov-231/11/202330/11/2023
202406FY 2024Dec-231/12/202331/12/2023
202407FY 2024Jan-241/01/202431/01/2024
202408FY 2024Feb-241/02/202429/02/2024
202409FY 2024Mar-241/03/202431/03/2024
202410FY 2024Apr-241/04/202430/04/2024
202411FY 2024May-241/05/202431/05/2024
202412FY 2024Jun-241/06/202430/06/2024
202501FY 2025Jul-241/07/202431/07/2024
202502FY 2025Aug-241/08/202431/08/2024
202503FY 2025Sep-241/09/202430/09/2024
202504FY 2025Oct-241/10/202431/10/2024
202505FY 2025Nov-241/11/202430/11/2024
202506FY 2025Dec-241/12/202431/12/2024
202507FY 2025Jan-251/01/202531/01/2025
202508FY 2025Feb-251/02/202528/02/2025
202509FY 2025Mar-251/03/202531/03/2025
202510FY 2025Apr-251/04/202530/04/2025

FTE table:

periodFE codeFTE
2025010001200
2025010002220
2025010003180
2025020001170
2025020002230
2025020003220
2025030001190
2025030002210
2025030003210
2025040001210
2025040002220
2025040003160
2025050001150
2025050002250
2025050003135
2025060001175
2025060002215
2025060003195
2025070001220
2025070002215
2025070003200

Hours table:

periodFE codeDisc_Hrs
2025010001600
2025010002500
2025010003700
2025020001500
2025020002600
2025020003650
2025030001450
2025030002500
2025030003390
2025040001450
2025040002550
2025040003625
2025050001500
2025050002525
2025050003670
2025060001635
2025060002475
2025060003590
2025070001585
2025070002655
2025070003490

 

I have created a new measure as below:

HoursperFTE = SUM(Hours[Disc_Hrs]) / SUM (FTE[FTE] )
 
Now I would like to get the cumulative/running sum of the above measure HoursperFTE by period.
Can someone help with this?
Thanks,
grkanth81
1 ACCEPTED SOLUTION
SamsonTruong
Solution Supplier
Solution Supplier

Hi @grkanth81 ,

Can you try the following DAX measure to get the cumulative/running sum and let me know if it achieves your desired result:

Cumulative_HoursperFTE =
VAR CurrentPeriod = SELECTEDVALUE(Period[Period_integer])
RETURN
SUMX(
    FILTER(
        ALL(Period),
        Period[Period_integer] <= CurrentPeriod
    ),
    CALCULATE(
        SUM(Hours[Disc_Hrs]) / SUM(FTE[FTE])
    )
)

 

If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.

Thanks,

Samson

 

View solution in original post

3 REPLIES 3
SamsonTruong
Solution Supplier
Solution Supplier

Hi @grkanth81 ,

Can you try the following DAX measure to get the cumulative/running sum and let me know if it achieves your desired result:

Cumulative_HoursperFTE =
VAR CurrentPeriod = SELECTEDVALUE(Period[Period_integer])
RETURN
SUMX(
    FILTER(
        ALL(Period),
        Period[Period_integer] <= CurrentPeriod
    ),
    CALCULATE(
        SUM(Hours[Disc_Hrs]) / SUM(FTE[FTE])
    )
)

 

If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.

Thanks,

Samson

 

Thanks Samson. That worked perfectly.

Awesome, happy to hear it worked!

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.