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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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