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
Anonymous
Not applicable

If Condition

Hi All,

I have one calculated column as 'Program Status'. my expression for that column is, if i have value in my completion_date column, then it should display "Certified" .. else it should display "Notcertified" .

 

The Problem is "I have blank values as well as spaces in the completion_date .. for spaces also it is taking Certified.

Below is my expression:

ProgramStatus = if(AND(ISBLANK(Data[COMPLETIONDATE]), Data[COMPLETIONDATE] = ""),"NotCompleted","Completed")

 

Capture.PNG

 

 

 

 

 Here, it shows completed for the one it has date and it shows completed if dont have date also.

 

Thanks,

Sai

2 ACCEPTED SOLUTIONS
judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

Try replacing the AND with OR.

 

Hope this helps

 

Thanks,

George

View solution in original post

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You can convert the data type to date, this should get rid of all the spaces and convert this to blanks, or you can use the TRIM function on your date field.

 

Using OR instead of AND should work as well.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


  

 

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You can convert the data type to date, this should get rid of all the spaces and convert this to blanks, or you can use the TRIM function on your date field.

 

Using OR instead of AND should work as well.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


  

 

judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

Try replacing the AND with OR.

 

Hope this helps

 

Thanks,

George

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.