Forum Discussion

Tlotly's avatar
Tlotly
Helper V
5 years ago
Solved

Create a mmm-yyyy column

Dear community   Is it possible for a YearMont column to be a date format? So basically I'm trying to create a financial yearmonth field from the calendar but I'm not getting it right. It creates s...
  • Kumail's avatar
    5 years ago

    Tlotly 

     

    If I understood your logic correctly, then this should help

     

     

    FinYearMonth = 
    VAR FiscalStartMonth = 7
    VAR FinYearMonth = If( MONTH([Date]) > (FiscalStartMonth - 1),
                            DATE((YEAR([Date])+1),MONTH([Date]),DAY([Date])),
                            DATE(YEAR([Date]),MONTH([Date]),DAY([Date])))
    RETURN
    FORMAT(FinYearMonth, "mmmm-yyyy")

     

     

     

    I hope this helps.

     

    Regards

    Kumail Raza