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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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