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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Y-Hernandez99P
Frequent Visitor

Error checking if a field is empty time type

Good morning, I hope you're all right.

My problem is that with a table I have, I have to do operations with some fields that from the database come as

String and had this column to get a data:

HORA FINAL = IF(ISBLANK([hora8])=FALSE();[ hora8];IF(ISBLANK([hora7])=FALSE();[ hora7];IF(ISBLANK([hora6])=FALSE();[ hora6];IF(ISBLANK([hora5])=FALSE();[ hora5];IF(ISBLANK([hora4])=FALSE();[ hora4]; 
IF(ISBLANK([hora3])=FALSE();[ hora3];IF(ISBLANK([hora2])=FALSE();[ hora2];" Solo hay 1 registro")))))))

But since I need the time format data, I made the change and the column prints me the following error:


use to define calculated columns

Here is a sample of the data:

erre.png

Thanks for reading.

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi , @Y-Hernandez99P 

This error often occurs  when  you try to use both one type value (text) and another  type value(time) in one calculate column so power bi can't auto analysis data type of this calculated column.

 

Here are some points to note.

1.replace all "" as null in query editor

25.png

 

2.change all of your  date column  Datatype  from "time"  to "text"

26.png

3. due to " There is  only one record" is  text type , so  make sure your calculate column data type is text rather than time

The result is  as followings.

27.png

Here is  a demo.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi , @Y-Hernandez99P 

This error often occurs  when  you try to use both one type value (text) and another  type value(time) in one calculate column so power bi can't auto analysis data type of this calculated column.

 

Here are some points to note.

1.replace all "" as null in query editor

25.png

 

2.change all of your  date column  Datatype  from "time"  to "text"

26.png

3. due to " There is  only one record" is  text type , so  make sure your calculate column data type is text rather than time

The result is  as followings.

27.png

Here is  a demo.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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