Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Dynamic Title to display previous month

Hi Folks,  I am trying to get dynamic title for my card visual. It should display previous month. I used below DAX.  abc = FORMAT(MONTH(TODAY())-1,"MMM").  Current Month is Aug, so result should...
  • DataNinja777's avatar
    2 years ago

    Hi Anonymous ,

    The reason your DAX formula is returning January is that formatting using "MMM" requires a complete date, not just a month number. There are several ways to achieve your desired output, and one approach is as follows:

    Previous Month = format(edate(today(),-1),"MMM")

     

     

    Best regards,