Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Option to preserve trailing spaces when data is loaded from Power Query into the semantic model

I've found that Power BI Desktop automatically trims trailing spaces from text columns. This is a bug IMO, Power BI should accurately store the data loaded. If we want to trim, we can do that in PQ.


If you want to keep trimming as the default behaviour, please add an option to turn that off (keep trailing spaces).


For context: my data is geospatial shapes in WKT format. Due to their length, they have to be split into multiple rows (in PQ) and then reassembled by a Measure using CONCATENATEX. But trailing spaces in any cell get trimmed when the query is loaded, which can result in invalid WKT from that Measure.


My hackaround is to replace the spaces with a pipe "|" character in the query, then wrap my CONCATENATEX in a SUBST function to replace "|" with " " (space). This is viable in my scenario as "|" is never used in WKT syntax. This preserves trailing spaces.


I made a simple repro PBIX for this bug:

https://1drv.ms/u/s!AmLFDsG7h6JPiJFy4l080eHn3D5Zqg?e=YQ4e91

Status: New
Comments
fbcideas_migusr
New Member
Status changed to: New