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
Syndicate_Admin
Administrator
Administrator

Help

= Table.AddColumn(#"Changed Type3", "Recode", each if Text.StartsWith([Change Type_ID],{"P","A","B","C"}) then [Change Type_ID] else [Location]&Text.End([ChangeType_ID],10))

This is not working in my query and Error for all

Error expression,  We cannot convert a value of type List to type Text.
Details:
Value=List
Type=Type

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Use this

= Table.AddColumn(#"Changed Type3", "Recode", each if List.Contains({"P","A","B","C"}, Text.Start([Change Type_ID],1)) then [Change Type_ID] else [Location]&Text.End([ChangeType_ID],10))

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Thank you for your reply. It working.

Vijay_A_Verma
Super User
Super User

Use this

= Table.AddColumn(#"Changed Type3", "Recode", each if List.Contains({"P","A","B","C"}, Text.Start([Change Type_ID],1)) then [Change Type_ID] else [Location]&Text.End([ChangeType_ID],10))

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.