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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
JC2022
Helper III
Helper III

Measure for cumulative sum

Hi,

I have some trouble with creating a measure. I have the fields below from 2 tables. Date and MonthYear from a calendar table. The other columns are from a different table with obviously a relationship between Date columns.

Now I am trying to create a cumulative sum measure of the "Hours to do per workday". But this measure should be able to filter on a speficic Category, Team and Project. But when removing a (for example) Team filter it should cumulate the sum per Category. And when removing the Category and Team it should cumulate the sum per Date. Etc. 

So on the 09/07/2024 date it should be the sum of 08/07/2024 and 09/07/2024 together. For the Categories, Teams and Projects. How can this be done in a measure?

Is anyone able to help me? 

 

Row Labels8-7-20249-7-202410-7-2024Grand TotalCategory A0,900,900,902,70Team A0,900,900,902,70Category B1,651,651,654,95Team D0,850,850,852,54Team I0,800,800,802,41Category C6,716,715,9319,35Team B1,751,750,974,47Team C0,760,760,762,29Team E1,761,761,765,27Team F0,840,840,842,52Team G0,800,800,802,40Team H0,800,800,802,40Grand Total9,269,268,4827,00

GH7610080,900,900,902,70
GH7606400,850,850,852,54
AT5115520,800,800,802,41
AT5116370,970,970,972,91
GH7608850,780,78 1,56
AT5108470,760,760,762,29
GH7602430,900,900,902,70
GH7608090,860,860,862,57
GH7606190,840,840,842,52
GH7608540,800,800,802,40
GH7605560,800,800,802,40
1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@JC2022 , Try using below mentionedmeasure

CumulativeHours =
VAR CurrentDate = MAX('Calendar'[Date])
RETURN
CALCULATE(
SUM('WorkData'[HoursToDoPerWorkday]),
FILTER(
ALLSELECTED('Calendar'),
'Calendar'[Date] <= CurrentDate
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

1 REPLY 1
bhanu_gautam
Super User
Super User

@JC2022 , Try using below mentionedmeasure

CumulativeHours =
VAR CurrentDate = MAX('Calendar'[Date])
RETURN
CALCULATE(
SUM('WorkData'[HoursToDoPerWorkday]),
FILTER(
ALLSELECTED('Calendar'),
'Calendar'[Date] <= CurrentDate
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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