Forum Discussion
Baskar
Resident Rockstar
8 years agoPrevious 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()))
?
Greg_Deckler
Community Champion
8 years agoHow about:
Measure = DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY()))
?
JohnNPBIUser
Advocate I
1 year agoUnfortuanely, I don't think this works correctly. If you test this measure today (31/03/2025) then it gives a date of 03/03/2025, which is not the last month. This is because the date function is calcualting the number of days in the previous month and subtracting that from today's month date so therefore the 31/03 - 28 = 03/03.