cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

## Help needed: Measure to return a cumulative (i.e. running) sum for a calculated column

Hello

Fairly new to Power BI, so there's probably a simple solution for my problem!

I have the following table ('Burnup Data') where I am trying to calculate a running total (Planned Cumulative) based on Planned. However, the existing Planned Cumulative is not the Expected Result:

I have the following measures:

Planned =
VAR Sprint = [Sprint]
VAR MAXDate = MAX('Current PI - All User Stories'[Date])
RETURN
IF(MAXDate >= [Date],BLANK(),
CALCULATE(
SUM('Current PI - All User Stories'[Story Points]),
'Current PI - All User Stories'[Date] = MAXDate, 'Current PI - All User Stories'[Sprint] IN { Sprint })
)

Planned Cumulative =
CALCULATE(
SUM('Burnup Data'[Planned]),
FILTER(
ALL('Burnup Data'),
'Burnup Data'[Date] <= MAX('Burnup Data'[Date])
)
)

Any help would be greatly appreciated!

1 ACCEPTED SOLUTION
Resolver II

Hi @simonm8008 ,

I have created a simple sample, please refer to it to see if it helps you.

sum for a calculated column.pbix

Create a measure.

``````Measure =
CALCULATE (
SUM ( 'Table'[Planned] ),
FILTER ( ALL ( 'Table' ), 'Table'[date] <= SELECTEDVALUE ( 'Table'[date] ) )
)``````

If the planed column is written by a measure.

``Measure 2 = SUMX(FILTER(ALL('Table'),'Table'[date]<=SELECTEDVALUE('Table'[date])),[Planned_])``

If I have misunderstood your meaning, you can create simple data with excel, then show me the screenshots about the data and the desired output your want.

Best regards.

2 REPLIES 2
Resolver II

Hi @simonm8008 ,

I have created a simple sample, please refer to it to see if it helps you.

sum for a calculated column.pbix

Create a measure.

``````Measure =
CALCULATE (
SUM ( 'Table'[Planned] ),
FILTER ( ALL ( 'Table' ), 'Table'[date] <= SELECTEDVALUE ( 'Table'[date] ) )
)``````

If the planed column is written by a measure.

``Measure 2 = SUMX(FILTER(ALL('Table'),'Table'[date]<=SELECTEDVALUE('Table'[date])),[Planned_])``

If I have misunderstood your meaning, you can create simple data with excel, then show me the screenshots about the data and the desired output your want.

Best regards.

Super User

Please check this post Solved: Cumulative Sum using DAX - Microsoft Power BI Community

Thanks,

Ritesh