Forum Discussion
[Data.Format]Error we couldn't convert to number
- 1 year ago
Hi SandoK ,
Thanks for reaching out to the Microsoft fabric community forum.
Before converting to number, ensure only numeric values are retained. You can modify the "Parent" column step like this:
Replace this:
#"Extarcted Parent from customer name" = Table.AddColumn(#"Removed rows for total and Internal cutomer", "Parent", each Text.End([Customer Name],6)),With this:
#"Extarcted Parent from customer name" = Table.AddColumn(#"Removed rows for total and Internal cutomer", "Parent", each try Number.FromText(Text.End([Customer Name],6)) otherwise null),And you can now skip changing its type, since non-numeric values will be null.
Note: Filter out nulls if needed
If null values in "Parent" aren't desired downstream:
#"Filtered valid parent values" = Table.SelectRows(#"Extarcted Parent from customer name", each [Parent] <> null)If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards - 1 year ago
Hi SandoK ,
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards
Hi SandoK ,
Thanks for reaching out to the Microsoft fabric community forum.
Before converting to number, ensure only numeric values are retained. You can modify the "Parent" column step like this:
Replace this:
#"Extarcted Parent from customer name" = Table.AddColumn(#"Removed rows for total and Internal cutomer", "Parent", each Text.End([Customer Name],6)),
With this:
#"Extarcted Parent from customer name" = Table.AddColumn(#"Removed rows for total and Internal cutomer", "Parent", each try Number.FromText(Text.End([Customer Name],6)) otherwise null),
And you can now skip changing its type, since non-numeric values will be null.
Note: Filter out nulls if needed
If null values in "Parent" aren't desired downstream:
#"Filtered valid parent values" = Table.SelectRows(#"Extarcted Parent from customer name", each [Parent] <> null)
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards
Hi SandoK ,
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards