The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have device details like below , some same device is assigned to different people. I want to create a new column which says if the device is attached to same or different people using power query, please suggest;
Final result;
there could be more than two entries for the same device.
Assuming each DeviceName/AssignedTo row is not duplicated, then
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8kksKMkvMFTSUQpILUktUorVQRbzSsxNLUYSMwKJleZkpiKJGQPFHPPyMMTccvKLQIKxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DeviceName = _t, AssignedTo = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DeviceName", type text}, {"AssignedTo", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"DeviceName"}, {
{"All", each _, type table [DeviceName=nullable text, AssignedTo=nullable text]},
{"Remarks", each if Table.RowCount(_) = 1 then "Same" else "Different", type text}
}),
#"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"AssignedTo"})
in
#"Expanded All"