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

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.

Reply
benn
New Member

Power Query - How to resolve variable/column scope, or how to reference column inside a table.

 

In Power BI, I have a table that has a column of tables. See screenshot below:

 

 Pic1.png

 

Inside of the column called ThirdTable, each has a table that has the final information I’d like to grab. Specifically, the row with the value “Title”. See below for a screenshot of that table:

 

 Pic2.png

 

 

The simple query I’ve written is as follows:

 

let

finalRow = Table.SelectRows([ThirdTable], [Name] = "Title")

in

finalRow

 

 

The issue is that Power Query ends up searching for the [Name] column on the higher level table, and it ends up failing because there is no [Name] column on the higher level. I’d really just like to be able to reference the [Name] column from [ThirdTable]. I’d like to do something as simple as [ThirdTable].[Name] or something like that.

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@benn,

 

You may add step below.

= Table.TransformColumns(#"Added Custom", {"ThirdTable", each Table.SelectRows(_, each ([Name] = "Title"))})
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@benn,

 

You may add step below.

= Table.TransformColumns(#"Added Custom", {"ThirdTable", each Table.SelectRows(_, each ([Name] = "Title"))})
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.