The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
81 | |
81 | |
37 | |
34 | |
31 |
User | Count |
---|---|
94 | |
80 | |
60 | |
50 | |
49 |