Forum Discussion
TJacobs
9 years agoFrequent Visitor
PowerBi cumulative calculation goes wrong
Hi all, I'm in a loss in this matter, I've tried many DAX formulas and read many forums but unfortunately I didn't found the solution. This is the issue I've created a calculated Line Chart...
- 9 years ago
Hi TJacobs,
Based on my test, the formula below should work in your scenario. :smileyhappy:
Sales Cumulative = CALCULATE ( SUM ( 'Blad1 (2)'[Turnover total]), FILTER ( ALLSELECTED('Blad1 (2)'), 'Blad1 (2)'[Date_Month] <= MAX('Blad1 (2)'[Date_Month]) ) )Regards
TJacobs
9 years agoFrequent Visitor
Hello,
Thanks for you replies!
Here is the link to the example PBIX and Excel file:
To reproduce the issue: please select all the product groups except subgroup ''Damage'' and move the cursor to the second month in the line chart. The line chart now says that there is a turnover of ''5000''. Now when you deselect the third month it says that you have a turnover of ''3500'' but it should be ''5000'' like the green card is displaying.
v-ljerr-msft
Microsoft Employee
9 years agoHi TJacobs,
Based on my test, the formula below should work in your scenario. :smileyhappy:
Sales Cumulative =
CALCULATE (
SUM ( 'Blad1 (2)'[Turnover total]),
FILTER (
ALLSELECTED('Blad1 (2)'),
'Blad1 (2)'[Date_Month] <= MAX('Blad1 (2)'[Date_Month])
)
)
Regards
- TJacobs9 years agoFrequent Visitor
Yep! now it's working!
Thanks! :)