Forum Discussion
TonyGu
4 years agoHelper I
DAX Measure needs Help
I am trying to writing a measure that return the count of active patient of the previous month. I have written a measure that return the count of previous year working. But when I expand to month lev...
- 4 years ago
Sorry:
Active Base Count PM = CALCULATE([Active Base count], PREVIOUSMONTH(DimDates[Date]))
CNENFRNL
4 years agoCommunity Champion
DATESINPERIOD() comes into play.
- TonyGu4 years agoHelper I
I tried this measure but it's not giving what I want.
Active Patient Base PM =CALCULATE([Active Base count],DATESINPERIOD(DimDates[Date],MAX(DimDates[Date])-31,-1,MONTH))- CNENFRNL4 years agoCommunity Champion
Not surprising at all that you can't get the right answer. You should learn DAX from scratch, the very first thing is that DAX is NOT Excel worksheet formula; DAX formula is very sensetive to the context where it evaluates. Thus, any discussion over DAX without dataset model is nothing but gibberish.