Forum Discussion

cristianml's avatar
cristianml
Post Prodigy
3 years ago
Solved

Add custom column for date with if

Hi,   I want to add a custom column instead of doing it in dax : How can I write this in Query editor ?   Date = DATE(IF([Month #]>=9,[FY]-1,[FY]),[Month #],1)   Thanks !      
  • MahyarTF's avatar
    3 years ago

    Hi,

    1- You could add another column based on your condition :

    if [Month] >= 9 then [FY]-1 else [FY]

    2-Insert New column :

    Text.Combine({Text.From([Date], "en-AU"), Text.From([Month], "en-AU"), Text.From("01")}, "-")

    3- Change the Column format to Date :

    Appreciate your Kudos and please mark it as a solution if it helps you