Forum Discussion
Anonymous
8 years agoNot applicable
Previous Month from NOW() or Today()
Thanks Advanced, I have to get Previous month from NOW() or TODAY(). While using DATEADD or PREVIOUSMONTH it was asking Dates as columns. It won't allow this two functions. Greg_Deckler
- 8 years ago
How about:
Measure = DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY()))
?
anmattos
Advocate I
5 years agoAnonymous,
I had the same problem today. I just used the function EDATE, like that:
EDATE(<start_date>, <months>)
EDATE ( TODAY(), -1)
It handles special cases like the previous month not having the 31st that, for example.
- Mrtnkbg2 years ago
Advocate I
This solved my issue.
I was looking for a solution to creating a measure for a text title that should contain the name of last/previous month from the current date via concatenate.