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
markus_zhang
Advocate III
Advocate III

[Excel] Expressions that yield variant data-type cannot be used to define calculated columns.

Hi experts,

 

I'm getting this strange error in Excel Power Pivot:

 

Expressions that yield variant data-type cannot be used to define calculated columns.

 

Now if I look at the columns that have this error, the formula is simple:

IFERROR([NTK], 0)

 

However in my case [NTK] column is all empty, and when I check the imported data all columns have "General" type but only NTK has this problem. Other columns have empty cells too so I don't think that's the problem.

 

I really have no idea what to do about this weird thing, but alas I cannot upload my Excel file, and a dummy file probably won't work out.

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @markus_zhang,

 

This error prompts when there existing two different data types in formula. In your scenario, you used both number value (zero 0 ) and text value ( [NTK] ) in  single column.

 

You can replace the 0 with BLANK() or "" to avoid such an error.

 1.PNG2.PNG3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @markus_zhang,

 

This error prompts when there existing two different data types in formula. In your scenario, you used both number value (zero 0 ) and text value ( [NTK] ) in  single column.

 

You can replace the 0 with BLANK() or "" to avoid such an error.

 1.PNG2.PNG3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
markus_zhang
Advocate III
Advocate III

Hi I figured it out,

 

=[NTK] works but =IFERROR([NTK], 0) doesn't work, weird...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors