Forum Discussion

Stharwani's avatar
Stharwani
Advocate II
9 years ago
Solved

Convert Period to Month name

Hello,   My period is formed of date  FinPeriod = if(month('Date'[Date])>6,MONTH('Date'[Date])-6,month('Date'[Date])+6)   Is there a way to format the period number to MMM format, mainly for vis...
  • v-huizhn-msft's avatar
    9 years ago

    Hi Stharwani,

    After research, we unable to transfer number month to "MMM" format directly. You'd better create a calculated column using the formula.

    NewPeriod=SWITCH([FinPeriod], 1, "Jan", 2, "Feb", 3, "Mar", 4, "Apr"  
                   , 5, "May", 6, "Jun", 7, "Jul", 8, "Aug"  
                   , 9, "Sep", 10, "Oct", 11, "Nov", 12, "Dec"  
                   , "Unknown month number" )  


    Then use the [NewPeriod] as axis level, to replace the period number.

    Best Regards,
    Angelia