Forum Discussion
NavaneethaRaju
3 years agoHelper IV
Need Help with Dax- Interview Question
Hi,
I just shared the interview question that asked to me during on the interview.
Consider we have only 2 dates.
Date:--------Previous Month
09/01/2022- Dec
09/02/2022- Jan
W...
- 3 years ago
what about:
Measure or Column = EDATE ( 'Table'[Date], -1 )
or
= MONTH( EDATE ( 'Table'[Date], -1 ))
Mikelytics
3 years agoResident Rockstar
lease try the following
base data
Mesure and result
formula:
Measure Previous Month =
var var_ReferenceDate = MONTH(MAX(Dates[Date]))
Return
IF(var_ReferenceDate=1,12,var_ReferenceDate-1)There might be a better solution but this is the quick and dirty one 🙂
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.