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...
Smalfly
2 years agoResponsive Resident
Hi Anonymous ,
could it be that you are pulling data from your SQL database that has blank values "" instead of null values?
If so, you can put this statement before your trim step:
= Table.ReplaceValue(#"FilteredRows3","",null,Replacer.ReplaceValue,{"Account Description"})
Anonymous
2 years agoNot applicable
I've done it as well, adding these lines on the last working steps
#"Filtered Rows3" = Table.SelectRows(#"Renamed Columns", each ([Entity Group] <> "TPL")),
#"Replaced Value" = Table.ReplaceValue(#"Filtered Rows3","",null,Replacer.ReplaceValue,{"Account Description"}),
#"Trimmed Text" = Table.TransformColumns(#"Replaced Value",{{"Account Description", Text.Trim, type text}})
in
#"Trimmed Text"
But it still gave me the same error. I'm almost close to thinking that there's something wrong about how my sql and bi connection is set-up. Everything is working, except when I trim.
Thanks for the new approach.
- MisterNL1 year agoNew Member
I had the same issue. I did a Clean in front of the Trim and it worked afterwards