Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello everyone,
in this table START_Date & END_DATE columns have 3 values or more (values and their sum), I want to get cumulative for sum values only.... thank u for ur help
Solved! Go to Solution.
Hi @minasaleh669,
You may try this Measure.
CumulativeTotalExcludingData =
VAR cumulativeTotal =
CALCULATE (
SUM ( 'Table'[ACT_COST] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[END_DATE] ),
'Table'[Index] <= MAX ( 'Table'[Index] ) //sum by the order in the screeshot
//'Table'[WBS_ID] <= MAX ( 'Table'[WBS_ID] ) //sum by WBS_ID ascending
)
)
RETURN
IF (
MAX ( 'Table'[START_DATE] ) >= DATE ( 2019, 5, 1 )
&& MAX ( 'Table'[START_DATE] ) <= DATE ( 2019, 7, 1 ),
cumulativeTotal,
BLANK ()
)
As this Measure calculates cumulative total by the order in the screenshot, you need add an extra index column in Power Query Editor(Transform Date). If you just would like to get cumulative total by the order of WBS_ID ascending, then you can try the annotated code.
The result looks like this.
Also, attached the pbix file.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @minasaleh669,
You may try this Measure.
CumulativeTotalExcludingData =
VAR cumulativeTotal =
CALCULATE (
SUM ( 'Table'[ACT_COST] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[END_DATE] ),
'Table'[Index] <= MAX ( 'Table'[Index] ) //sum by the order in the screeshot
//'Table'[WBS_ID] <= MAX ( 'Table'[WBS_ID] ) //sum by WBS_ID ascending
)
)
RETURN
IF (
MAX ( 'Table'[START_DATE] ) >= DATE ( 2019, 5, 1 )
&& MAX ( 'Table'[START_DATE] ) <= DATE ( 2019, 7, 1 ),
cumulativeTotal,
BLANK ()
)
As this Measure calculates cumulative total by the order in the screenshot, you need add an extra index column in Power Query Editor(Transform Date). If you just would like to get cumulative total by the order of WBS_ID ascending, then you can try the annotated code.
The result looks like this.
Also, attached the pbix file.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
User | Count |
---|---|
9 | |
8 | |
5 | |
4 | |
3 |