Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Solved! Go to Solution.
Hi @PaulinePitt ,
We can meet your requirement in the Power Query Editor, following is the M Query
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtNQ3NNA3UtJRCoFiIAoGYnelWB2EAkOgSBAUg2R9QTiZHCWOUAxELqjWWOobGwBFvKAYaoyRhZlSbCwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"created at " = _t, #"created by " = _t, assigned = _t, #"split user" = _t, #"buddy rehash" = _t, store = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"created at ", type date}, {"created by ", type text}, {"assigned", type text}, {"split user", type text}, {"buddy rehash", type text}, {"store", type text}}), #"New Table" = Table.SelectRows(#"Changed Type",each Text.Trim([split user]) <> ""), #"Renamed Columns" = Table.RenameColumns(#"New Table",{{"split user", "assigned"}, {"assigned", "split user"}}), #"Append Query" = Table.Combine({#"Changed Type",#"Renamed Columns"}), #"Added Custom" = Table.AddColumn(#"Append Query", "Custom", each if Text.Trim([split user]) <> "" then "Y" else ""), #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"split user"}), #"Renamed Columns1" = Table.RenameColumns(#"Removed Columns",{{"Custom", "split user"}}), #"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns1",{"created at ", "created by ", "assigned", "split user", "buddy rehash", "store"}) in #"Reordered Columns"
1. create a new table use selectrow function, then change the name of assigned and split user column
2. append the new table step by the origin table step
3. add a new column to replace value in split user into Y
4. remove unnessary column and reorder the column
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PaulinePitt ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PaulinePitt ,
We can meet your requirement in the Power Query Editor, following is the M Query
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtNQ3NNA3UtJRCoFiIAoGYnelWB2EAkOgSBAUg2R9QTiZHCWOUAxELqjWWOobGwBFvKAYaoyRhZlSbCwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"created at " = _t, #"created by " = _t, assigned = _t, #"split user" = _t, #"buddy rehash" = _t, store = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"created at ", type date}, {"created by ", type text}, {"assigned", type text}, {"split user", type text}, {"buddy rehash", type text}, {"store", type text}}), #"New Table" = Table.SelectRows(#"Changed Type",each Text.Trim([split user]) <> ""), #"Renamed Columns" = Table.RenameColumns(#"New Table",{{"split user", "assigned"}, {"assigned", "split user"}}), #"Append Query" = Table.Combine({#"Changed Type",#"Renamed Columns"}), #"Added Custom" = Table.AddColumn(#"Append Query", "Custom", each if Text.Trim([split user]) <> "" then "Y" else ""), #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"split user"}), #"Renamed Columns1" = Table.RenameColumns(#"Removed Columns",{{"Custom", "split user"}}), #"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns1",{"created at ", "created by ", "assigned", "split user", "buddy rehash", "store"}) in #"Reordered Columns"
1. create a new table use selectrow function, then change the name of assigned and split user column
2. append the new table step by the origin table step
3. add a new column to replace value in split user into Y
4. remove unnessary column and reorder the column
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |