Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hey all,
I have a case where I my Bingfoo and Googlefoo is failing me. I have 2 tables that I am trying to rectify. The first is a list of users and it has a column of lists that contain a number of GUIDs for each user, and each user has a different number of total GUIDs. I have then created an Excel doc to be able to rectify the GUID to a friendly name. With the number of each GUID each user has, would make this difficult to stay dynamic if I just did the expand list into columns and then merged because one user may have 1 GUID and another could have 20. And example of what I have is:
User list:
UserID | GUID's |
user1 | guid1 |
user2 | guid2, guid3, guid4 |
user3 | guid1, guid2, guid3, guid4 |
user4 | guid3, guid4 |
GUID table:
guid1 | friendly1 |
guid2 | friendly2 |
guid3 | friendly3 |
guid4 | friendly4 |
Desired outcome:
User1 | friendly1 |
User2 | friendly2, friendly3, friendly4 |
User3 | friendly1, friendly2, friendly3, friendly4 |
User4 | friendly3, friendly 4 |
So my dilemma is how to do this with a power query unless your big brains have another way to do this better
Thank you for your insights
let
user_list = Excel.CurrentWorkbook(){[Name="user_list"]}[Content],
guid_table = Function.Invoke(
Record.FromList,
List.Reverse(Table.ToColumns(Excel.CurrentWorkbook(){[Name="guid_table"]}[Content]))
),
result = Table.TransformColumns(
user_list,
{"guid", (x) => Text.Combine(
List.Transform(
Text.Split(x, ", "),
(w) => Record.FieldOrDefault(guid_table, w, w)
),
", "
)}
)
in
result
updated my post with the correction to my typo. and I have added what my desired outcome is.
What is your final result?
Your user list example has formatting inconsistencies (comma missing for user2). Are these to be expected with the real data as well?
What is your expected outcome based on the sample you provided?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
30 | |
23 | |
16 | |
15 | |
11 |