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.
I want to add text AAB to column ID (type text) if the text value already includes letter F. I cannot seem to combine the below expresions:
If I only use this it works fine:
#"Add to name" = Table.TransformColumns(#"Renamed", {{"ID", each Text.Combine({"AAB",(_)}), type text}})
I want to add conditional statment but I am falling short. What I would want to achive:
each if Text.Contains([ID], "F") then [execute the above] else null)
I am trying:
= if Text.Contains({#"Renamed, {"ID"}}, "F") then (Table.TransformColumns(#"Renamed", {{"ID", each Text.Combine({"AAB",(_)}), type text}})) else null
but getting expression error (list not convertable to text)
Solved! Go to Solution.
Hi @davidz106 ,
Please try this :
= Table.AddColumn(#"Changed Type", "Custom", each if Text.Contains([ID],"F") then [ID] & "AAB" else null)
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
Hi @davidz106 ,
Please try this :
= Table.AddColumn(#"Changed Type", "Custom", each if Text.Contains([ID],"F") then [ID] & "AAB" else null)
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
13 | |
11 |