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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Error * If statement for date

Hi, 

I would like to create If Statement in my 2 Date Columns. 

It works well in excel, but in Power Bi, it gives me the error warning. 

What should I change to make it work?

Hope to hear from you. 

Thanks

Dax IF Date.PNG

1 ACCEPTED SOLUTION
ntaylo06
Resolver II
Resolver II

I believe that PBI is seeing "" as a string, even though it is empty. Try using:

IF(ISBLANK('Table'[Field]), "if true", "if false")

 

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

In power bi, just try this formula

 

IF(Deals[Deal·Deal closed on].[Date]=BLANK(),"Open",IF(Deals[Deal·Won time].[Date]=BLANK(),"Lost","Won"))

or

 IF(ISBLANK(Deals[Deal·Deal closed on].[Date]),"Open",IF(ISBLANK(Deals[Deal·Won time].[Date]),"Lost","Won"))

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-lili6-msft I will try and let you know later 🙂 

Thanks for reply 

ntaylo06
Resolver II
Resolver II

I believe that PBI is seeing "" as a string, even though it is empty. Try using:

IF(ISBLANK('Table'[Field]), "if true", "if false")

 

Anonymous
Not applicable

I will try and let you know later!!

Thanks for quick reply 🙂 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 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.

October NL Carousel

Fabric Community Update - October 2024

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