Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
=Table.TransformColumns(#"Split Column by Position", List.Transform(#"List of Columns to Create", each {_, each Text.PositionOfAny(Text.Reverse(Text.Range(_,0,Text.Length(_))),{"1"},8) }), MissingField.Ignore)This is the error:
Expression.Error: We cannot convert the value 1 to type Function. Details: Value=1 Type=[Type]Any ideas why and how to solve it?
Solved! Go to Solution.
Hi @JulianaMacedo ,
You may use try and otherwise syntax:
Error handling - Power Query | Microsoft Docs
Best Regards,
Eyelyn Qin
Hello - please try this...
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwACKCQClWJ1oprzQnB8wgoEkpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
Source1 = Table.ReplaceValue(Source,"null",null,Replacer.ReplaceValue,{"Column1"}),
// replace this list with your list of column names
#"List of Columns to Create" = {"Column1.1", "Column1.2", "Column1.3", "Column1.4", "Column1.5"},
#"Split Column by Position" = Table.SplitColumn(Source1, "Column1", Splitter.SplitTextByRepeatedLengths(8), #"List of Columns to Create")
in
#"Split Column by Position"
Hi! Thanks for your contribution, I actually tried the other suggest solution first and it seems to be working fine, so I haven't tried yours, but it also seems like it would be a suitable solution.
Hi @JulianaMacedo ,
You may use try and otherwise syntax:
Error handling - Power Query | Microsoft Docs
Best Regards,
Eyelyn Qin
Thanks a lot! I didn't know there was a try clause in power bi, it did work!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 |