Forum Discussion
DAX
- 6 years ago
Anonymous try this
Tag = IF ( EOMONTH ( Table[Date], 0 ) = EOMONTH ( TODAY(), -1 ), "Previous Month", IF ( EOMONTH ( Table[Date], 0 ) = EOMONTH ( TODAY(), 0 ), "Current Month", "" ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Anonymous try this
Tag =
IF ( Table[Date] < EOMONTH ( TODAY(), -1 ) + 1, "Previous Month",
IF ( EOMONTH ( Table[Date], 0 ) = EOMONTH ( TODAY(), 0 ), "Current Month",
"Next Month"
) )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Buddy, Thanks a ton !
I implemented the expression. However, April month is getting tagged as the previous month ( ideally it should not ).
Technically, April as Not consider ; May as Previous month and June as Current month
Please advise.
- parry2k6 years ago
Super User
Anonymous try this
Tag = IF ( EOMONTH ( Table[Date], 0 ) = EOMONTH ( TODAY(), -1 ), "Previous Month", IF ( EOMONTH ( Table[Date], 0 ) = EOMONTH ( TODAY(), 0 ), "Current Month", "" ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡