Forum Discussion
travelsandbooks
3 years agoFrequent Visitor
PowerQuery: python script converts unrelated text columns to int
I have a table with a 19-digit numerical ID column, formatted as text, and another text column. When I run a Python script in PowerQuery which manipulates the data in the text column, I've notice...
- 3 years ago
The solution to this was that the ID column, despite being formatted as text in the data model, was not formatted as text properly.
When I tried to make it the key column of the table, PowerBI told me that it had nulls, and therefore it couldn't be used.
I removed the null, and hey presto - the Python script worked as it should.
travelsandbooks
3 years agoFrequent Visitor
The solution to this was that the ID column, despite being formatted as text in the data model, was not formatted as text properly.
When I tried to make it the key column of the table, PowerBI told me that it had nulls, and therefore it couldn't be used.
I removed the null, and hey presto - the Python script worked as it should.