Forum Discussion
josuesanchezSA
2 years agoFrequent Visitor
Missing values in cumulative dax
Hello, I am trying to get a cumulative total which as you can see below it works, except in period 05 and 09, the totals should be 68 for period 05 and 108 for period 09. Since there were no val...
- Anonymous2 years ago
Hi josuesanchezSA ,
Based on the description, try the following methods:
Measure 2 = VAR startyear = DATE(2023, 01, 01) VAR enddate = MAX('Table1'[Date]) - 365 VAR CurrentDate = MAX('Table'[Date]) var _period = SELECTEDVALUE(Table1[Month Period]) var result = CALCULATE( COUNTA('Table1'[ID]), FILTER( ALL('Table'), 'Table'[Date] <= CurrentDate && 'Table'[Date] >= startyear && 'Table'[Date] < enddate ) ) RETURN IF(ISBLANK(result) || _period > 9, 0 , result)Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
josuesanchezSA
2 years agoFrequent Visitor
Hello,
That takes me back where i started, however i do want to say that what is causing this error is that for period 5 there are no values, however, if its its a cumulative total, the result should be 68 not 0