Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
smpa01
Community Champion
Community Champion

Multiple Intermediate step

@ImkeF  came across this awesome link  and I was wondering if there is a way to refer to multiple/any intermediate steps.

 

E.g.

 

// dims table

let
    dimOne = #table({"ky", "valOne"}, {{"ky1", 90.3}, {"ky2", 89.5}}),
    dimTwo = #table({"ky", "valTwo"}, {{"ky1", 1}, {"ky2", 2}}),
    metaStep1 = dimOne meta[ref1=dimOne],
    metaStep2 = dimTwo meta[ref2=dimTwo]
in
    metaStep2

//facts table
let
    fact = #table({"ky", "amt"}, {{"ky1", 100}, {"ky2", 200}}),
    #"Merged Queries" = Table.NestedJoin(fact, {"ky"}, Value.Metadata(dims)[ref2], {"ky"}, "dims", JoinKind.LeftOuter)
in
    #"Merged Queries"

 

 

Is there a way to join metaStep1 in this? The folllowing errors out

 

let
    fact = #table({"ky", "amt"}, {{"ky1", 100}, {"ky2", 200}}),
    #"Merged Queries" = Table.NestedJoin(fact, {"ky"}, Value.Metadata(dims)[ref2], {"ky"}, "dims", JoinKind.LeftOuter),
    #"Removed Columns" = Table.RemoveColumns(#"Merged Queries",{"dims"}),
    #"Merged Queries1" = Table.NestedJoin(#"Removed Columns", {"ky"}, Value.Metadata(dims)[ref1], {"ky"}, "Removed Columns", JoinKind.LeftOuter)
in
    #"Merged Queries1"

 

 

Thank you in advance

@AlexisOlson 


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Try changing your dims table to this:

let
    dimOne = #table({"ky", "valOne"}, {{"ky1", 90.3}, {"ky2", 89.5}}),
    dimTwo = #table({"ky", "valTwo"}, {{"ky1", 1}, {"ky2", 2}}),
    metaStep = dimTwo meta[ref1=dimOne, ref2=dimTwo]
in
    metaStep

View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

Inspiring post! Nice to put another jaw-dropping trick under my belt!

 

When I dig in MS documentation, it turned out MS put away this pearl in a dusted corner.

Metadata - PowerQuery M | Microsoft Learn



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



AlexisOlson
Super User
Super User

Try changing your dims table to this:

let
    dimOne = #table({"ky", "valOne"}, {{"ky1", 90.3}, {"ky2", 89.5}}),
    dimTwo = #table({"ky", "valTwo"}, {{"ky1", 1}, {"ky2", 2}}),
    metaStep = dimTwo meta[ref1=dimOne, ref2=dimTwo]
in
    metaStep

This does not work in service df

 

Error: Expression.Error: The field 'ref1' of the record wasn't found
//DateTbl
let
  Source = {2023..2025},
  #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
  ------------------------------------------------------------
  metaStep =  #"Replace errors" meta[ref1=Source, ref2= #"Replace errors"]
in
 metaStep

//dimTbl
let
  Source = Text.From(Value.Metadata(DateTbl)[ref1]{1}),
  #"Convert to table" = Table.FromValue(Source)
in
  #"Convert to table"

 


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================

@AlexisOlson This is smooth and elegant !!!


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors