Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
cristianml
Post Prodigy
Post Prodigy

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 !
 
 
 
1 ACCEPTED SOLUTION
MahyarTF
Memorable Member
Memorable Member

Hi,

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

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

MahyarTF_0-1670390701880.png

2-Insert New column :

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

MahyarTF_1-1670390770704.png

3- Change the Column format to Date :

MahyarTF_2-1670390824097.png

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

Mahyartf

View solution in original post

1 REPLY 1
MahyarTF
Memorable Member
Memorable Member

Hi,

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

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

MahyarTF_0-1670390701880.png

2-Insert New column :

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

MahyarTF_1-1670390770704.png

3- Change the Column format to Date :

MahyarTF_2-1670390824097.png

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

Mahyartf

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.