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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
hi all
could you help me fix this forumla?
Solved! Go to Solution.
Hi @dantheram ,
For the example you mentioned I think it can be solved using the overlay method. I create a table as you mentioned.
Then I create a new measure to write the DAX code.
Measure =
VAR _currentKey =
SELECTEDVALUE ( 'Table'[Key] )
VAR _previousKey =
CALCULATE (
MAX ( 'Table'[Key] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Key] <= _currentKey )
)
RETURN
SUMX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Key] <= _previousKey ),
'Table'[Value]
)
Finally we will get what we want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dantheram ,
For the example you mentioned I think it can be solved using the overlay method. I create a table as you mentioned.
Then I create a new measure to write the DAX code.
Measure =
VAR _currentKey =
SELECTEDVALUE ( 'Table'[Key] )
VAR _previousKey =
CALCULATE (
MAX ( 'Table'[Key] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Key] <= _currentKey )
)
RETURN
SUMX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Key] <= _previousKey ),
'Table'[Value]
)
Finally we will get what we want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
i'll create some dummy data - i have half fixed it but it caused another graph to miscalculate now 😞
nearly fix it with this but it doesnt show "0" at the very start. so if week 1 is blank it leaves it blank rather than "0". as soon as a values occurs for a week it works perfectly
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.