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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
erhan_79
Post Prodigy
Post Prodigy

Query Formula Help

hi Doctors of Power BI 🙂 

 

first of all i would like thanks for your kind supports to us 

 

I need a support as below thanks in advance 

 

i have table on power bi , i have delivery date and and request date , i would like to create a new column which is calling new delivery date as on right of table , but i need to create this column on query editor 

 

rule will be like that 

 

if request  date is full then use request date , if request date is empty then use delivery date 

 

Capture1.JPG

 

also i would like to learn one more thing at the same taie pls : infact on power bi desktop i can use below formula and solve the problem but below formula i can not use in the query , i think query formula style and desktop formula style is different 

 

 

IF(ISBLANK(table[request date ]),table[Delivery date],table[Request date])
1 ACCEPTED SOLUTION

Hi @erhan_79 ,

 

Just remove the last bracket sign where it is showing red.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

#"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [Request Date] = "" then [Delivery Date] else [Request Date])



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Pragati11
Super User
Super User

HI @erhan_79 ,

 

The formula what you have got is a DAX expression.

Query editor uses another language called M-query.

 

You can write following formula in Query editor:

if([Request date ] = null) then [Delivery date] else [Request date])

 

Go to Query editor --> Under ADD COLUMN on the to ribbon, select CUSTOM COLUMN

A window appears and paste the above formula there. Don't forget to name your new column.

 

Thanks,

Pragati

 

 

 

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

dear @Pragati11 

 

thanks for your reply but i tried your formula as below but it gives error 

 

do i something wrong could you pls check 

 

Capture2.JPG

Hi @erhan_79 ,

 

Just remove the last bracket sign where it is showing red.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

thank you vry much @Pragati11  now it is working 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.