Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have one table, let's call it "User Dimension Values" that has the following layout:
User ID | Dimension | Dimension Values |
User A | Dimension A | 100..208 |
User B | Dimension A | 100..202|204..205 |
This is linked with another table, let's call it "Dimension Table" which will have the following layout:
Dimension Code | Code |
Dimension A | 050 |
Dimension A | 100 |
Dimension A | 201 |
Dimension A | 202 |
Dimension A | 203 |
Dimension A | 204 |
Dimension A | 205 |
Dimension A | 208 |
I want to use Power Query to create a third table inside Power Bi which would then have the following format:
User ID | Dimension | Code |
User A | Dimension A | 100 |
User A | Dimension A | 201 |
User A | Dimension A | 202 |
User A | Dimension A | 203 |
User A | Dimension A | 204 |
User A | Dimension A | 205 |
User A | Dimension A | 208 |
User B | Dimension A | 100 |
User B | Dimension A | 201 |
User B | Dimension A | 202 |
User B | Dimension A | 204 |
User B | Dimension A | 205 |
So how do I take the values in the "Dimension Values" column from the "User Dimension Values" Table and use the ranges such as
To then produce a table that will show me row by row each dimension value assigned to each user from the range?
Thanks
Solved! Go to Solution.
More simple
let
Source = #"User Dimension Values",
List = Table.AddColumn(Source, "Dimension Values 2", each Expression.Evaluate("{" & Text.Replace([Dimension Values], "|", "} & {") & "}")),
Expand = Table.ExpandListColumn(List, "Dimension Values 2"),
Join_Inner = Table.NestedJoin(Expand, {"Dimension", "Dimension Values 2"}, #"Dimension Table", {"Dimension Code", "Code"}, "Dimension Table", JoinKind.Inner)
in
Join_Inner
Stéphane
More simple
let
Source = #"User Dimension Values",
List = Table.AddColumn(Source, "Dimension Values 2", each Expression.Evaluate("{" & Text.Replace([Dimension Values], "|", "} & {") & "}")),
Expand = Table.ExpandListColumn(List, "Dimension Values 2"),
Join_Inner = Table.NestedJoin(Expand, {"Dimension", "Dimension Values 2"}, #"Dimension Table", {"Dimension Code", "Code"}, "Dimension Table", JoinKind.Inner)
in
Join_Inner
Stéphane
That's incredible. Thank you so much for the solution.
Hi
Split "Dimension Values" by "|" into rows
Convert "100..208" into list with Expression.Evaluate
Expand list
Join with "Dimension Values" (joinkind = Inner)
let
Source = #"User Dimension Values",
Split = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Dimension Values", Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Dimension Values"),
Convert_to_list = Table.TransformColumns(Split, {{"Dimension Values", each Expression.Evaluate("{"&_&"}")}}),
Expand = Table.ExpandListColumn(Convert_to_list, "Dimension Values"),
Join_Inner = Table.NestedJoin(Expand, {"Dimension", "Dimension Values"}, #"Dimension Table", {"Dimension Code", "Code"}, "Dimension Table", JoinKind.Inner)
in
Join_Inner
Stéphane
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
7 | |
6 | |
6 | |
6 |