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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
campelliann
Post Patron
Post Patron

Cannot convert record type to text

Hi,


I was getting the error mentioned above "cannot convert record type to text. The thing here is that I only get the error in power query if I write the code manually. If I go through the "add conditional column" option, I dont get any error. And the code seems to be exactly the same... Thanks in advance

 

1) with conditional column

correct_forum.png

 

2) with manual code (custom column)

error_forum.png

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @campelliann 

 

I don't use conditional column but always write it by myself, from the screenshots I can see probably this built in Add Conditional Column has error handling. The black part in the bar (the first screenshot) is showing Empty, the same as the red part (the second screenshot) showing the Error. To get the same result, you probably can wrap try..otherwise outside your if statement, BUT, please do have a look at your original data then decide what to do.

View solution in original post

1 REPLY 1
Vera_33
Resident Rockstar
Resident Rockstar

Hi @campelliann 

 

I don't use conditional column but always write it by myself, from the screenshots I can see probably this built in Add Conditional Column has error handling. The black part in the bar (the first screenshot) is showing Empty, the same as the red part (the second screenshot) showing the Error. To get the same result, you probably can wrap try..otherwise outside your if statement, BUT, please do have a look at your original data then decide what to do.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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