Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DAX

To get Previous month and current month as a new field.   Hi Guyz   I'm trying to create a custom column having "Current month" and "Previous month" as a tag based on the system date.  For examp...
  • parry2k's avatar
    parry2k
    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.