Forum Discussion
Anonymous
7 years agoNot applicable
Split One column into multiple columns
HI, I am new to power bi and sql. Im working on power bi audit log report file. The file contains a column 'AuditDate' n it has multiple columns in it, I need to split that column into multiple col...
- Anonymous7 years ago
Hi Anonymous,
You can direct handle these text value in query edit.
Fully query:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bZFbb4IwFMe/iuFpD4OVq5e9zGlMyDI1gvNBfCjtUeuAklJndNl3H5aOuMSEl/L7X3p61mvjOzFCmhiDxPA8Co4X9BLjMTEWQLig8bmEmjmo/jMSgCXjRcxyUHoH2T0T1Z8b287ARQPXU9ZZCUIpleqDwWkBJReygWKHC3ZRXPd2u33fb1qXFQjdifTxDc5KNZlMhu54qGQrLj4zjhv7nJ9AvIatX6ce+L54wSmxCM8VG2UMChnOFe1bvuVaTtC6hrsaKvTOLyzLcJI8+RbqPKxYQfmp6kzjjo0s9KwcQyLZF5PnexOGEvIp1m8U4Qyq9s5RiQm0LAach/FM0TGWuAL532frTVyj75FrZHWN1CNDDzBGBDcPnR6ASE1uTLrpb+fEpyamnm9CGvhecNPYKlJk9vuYmhQ8O/XtABGv20xaRUdCoKoHHEhxBJ1ecp4tYCug2kdkD/SYgd5pYkx5Ae01rsKWLAsKW1ZA3fpjbDa/", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [AuditDate = _t]), #"Added Custom" = Table.AddColumn(Source, "Custom", each Json.Document([AuditDate])), #"Expanded Custom" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"Id", "RecordType", "CreationTime", "Operation", "OrganizationId", "UserType"}, {"Id", "RecordType", "CreationTime", "Operation", "OrganizationId", "UserType"}), #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"AuditDate"}) in #"Removed Columns"Regards,
Xiaoxin Sheng
moonpie100
7 years agoFrequent Visitor
Hi.
I am not sure if this will work or not. But I thought I would give it a shot.
Click on Edit Queries.
Make sure that you have the table where data is stored selected, and then click on the column you wish to split.
Then Click on the Split Column Icon.
It looks as though your data fields are separated by commas, so choose the comma option under 'Select or enter delimiter'
and then select the 'Each Occurence of the delimiter' where it says split at.
And then click on OK.
I hope this helps.