Forum Discussion
Cumulative dax query help
Hi GuestUser ,
the same problem is described here.
https://community.powerbi.com/t5/Service/Running-Total-Issue/td-p/964702
Unfortunately, the SELECTEDVALUE solution is only available from SSAS 2017.
https://dax.guide/selectedvalue/
- GuestUser6 years agoHelper V
Hi mwegener
@Thanks for your inputs!!
Used below formula(similar)..replaced selected value by hasonevalue and it worked..
Thanks !!
Measure = CALCULATE ( [Sales], FILTER ( ALLSELECTED ( 'Table'[Category] ), 'Table'[Category] <= SELECTEDVALUE ( 'Table'[Category] ) ) )- v-eachen-msft6 years agoCommunity Support
Hi GuestUser ,
I am glad that your problem has been resolved, you could accept your own reply to close the case.
- GuestUser6 years agoHelper V
hi,
facing some strange behaviour
the below formula works
Cumulative = calculate( table[total sales],
filter
(allselected(item[item_name]),
item[item_name]<=if(hasonevalue(item[item_name]),values(item[item_name])
))
when i dont put any filter condition on total sales..cumulative value is correct...but it shows item with no sales as well
So when i put filter condition as total sales is not blank in report ,
then the cumulative value shows wrong value..it shows correct for 2 records..then the third record..it shows the same value as total sales
Any suggestions pls?