Forum Discussion
Anonymous
2 years agoNot applicable
Error in Trimming a Column
Hi, I'm working with a data imported from SQL database then to PowerBI. It's a direct import from power BI as we are not allowed to do anything through the MS SQLserver management studio So I h...
Anonymous
2 years agoNot applicable
Hi Anonymous ,
There seems to be no problem with the code. Could you try the code below and let me know the result?
let
Source = Sql.Database("hidden.sql.azuresynapse.net", "hidden"),
GL_Transaction = Source{[Schema="GL",Item="Transaction"]}[Data],
#"Filtered Rows" = Table.SelectRows(GL_Transaction, each [#"G/L Date"] >= #date(2022, 11, 1) and [#"G/L Date"] <= #date(2024, 5, 31) and ([Doc Type Description] = "Entries") and ([Entity Group] <> "TPL")),
#"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"Business Unit ", "Job/Project No."}, {"Explanation Alpha Name", "Description"}, {"Explanation -Remark-", "Additional Description"}}),
#"Trimmed Text" = Table.TransformColumns(#"Renamed Columns",{{"Account Description",each Text.Trim(_), type text}})
in
#"Trimmed Text"
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Anonymous
2 years agoNot applicable
Hi, tried the script above but it did not work as well 😞
Thanks for helping!