Forum Discussion
Anonymous
6 years agoNot applicable
Cumulative quantity
Hello, I have to calculate the cumulative quantity by weeks number. I have created a custom column "Wee Nr" that return the week number from a column data. I have tried with this formulas wit...
nandukrishnavs
Community Champion
6 years agoAnonymous
Can you provide a sample table and expected output values.
- Anonymous6 years agoNot applicable
I've created this quick measure which return exactly what I need
CALCULATE( SUM('Table'[Quantity]), FILTER( ALLSELECTED('Table'[Week Nr]), ISONORAFTER('Table'[Week Nr], MIN('Table'[Week Nr]), DESC) ) )And the result is :
Actually the problem is when I start to use the filter "Week Nr" it doesn't work well and it displays me the total per week and not the cumulative.
Note: the "Week Nr" column is a whole number as type. How can I fix that ?
Thank you for your reply!
- Anonymous6 years agoNot applicableHere's how to properly deal with weeks.
https://www.sqlbi.com/articles/week-based-time-intelligence-in-dax/
Best
D- Anonymous6 years agoNot applicable
many thanks Anonymous