Forum Discussion

PhazeRCIL's avatar
PhazeRCIL
Frequent Visitor
2 years ago
Solved

Previous Month in DirectQuery

Hello,
I have a "Is Current Month" formula that states yes for the current month:


IsMonth =
IF (AND(MONTH(DimDate[Date])= MONTH(TODAY()), YEAR(DimDate[Date]) = YEAR(TODAY())), "Yes", "No")

I would like to do the same thing, but for the previos month. But I need it to work when December and January overlap over the current year and the previous year.
 
What would be the best way to go about that?

2 Replies