Forum Discussion

anaib's avatar
anaib
Frequent Visitor
2 years ago
Solved

Create FY-Month column label based on "Date" column

Hello, I have a date column of cloud spend.  I need to present the cost based on Fiscal Year format, i.e., FY24-May-24.  Here is the magic decorder ring for the label breakdown:  Please note the Fis...
  • ryan_mayu's avatar
    ryan_mayu
    2 years ago

    anaib 

    i think you need to create that column by using DAX, not in the power query.

    if you want to do that in PQ, you can try this

     

    =if List.Contains({"Jul","Aug","Sep","Oct","Nov","Dec"} ,Text.Start([Month],3)) then "FY"&Text.From(Number.From( Text.End([Month],2))+1)&"-"&[Month] else "FY"&Text.End([Month],2)&"-"&[Month]