cancel
Showing results for 
Search instead for 
Did you mean: 
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

Accepted Solutions
ntaylo06 Regular Visitor
Regular Visitor

Re: Error * If statement for date

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
ntaylo06 Regular Visitor
Regular Visitor

Re: Error * If statement for date

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

Community Support Team
Community Support Team

Re: Error * If statement for date

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

Re: Error * If statement for date

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

Thanks for reply 

Anonymous
Not applicable

Re: Error * If statement for date

I will try and let you know later!!

Thanks for quick reply 🙂 

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 276 members 2,635 guests
Please welcome our newest community members: