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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power Query - Reference Filtered Column from another Query

Hi,

 

I'm trying to make my query a bit more efficient by doing multiple things in one step.

 

I'm trying to reference a column in another query as a new query, but I also want to filter down the results in this column so I end up with one cell. For example, this code allows me to reference just one column (Expected Pattern column) from another Query (Taxonomy - Expected Pattern):

= Table.SelectColumns(#"A: Taxonomy - Expected Patterns",{"expected_pattern"})

It gives me one column with all rows from the original Query.

 

I have 2 fields in the original Query that I'd like to use to filter down the results in this new Query. The following code shows how I'm referencing one row in the Query by filtering down the results:

= Table.SelectRows(#"A: Taxonomy - Expected Patterns", each ([taxonomy_date_source] = "DV360") and ([taxonomy_field] = "Insertion Order"))

I would like to combine both steps into one so I only have one row, showing the Expected Pattern for the Taxonomy Data Source and Taxonomy Field I'm filtering to.

 

Any ideas on how to achieve this?

 

Thanks,

Mark

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

= Table.SelectRows(#"A: Taxonomy - Expected Patterns", each ([taxonomy_date_source] = "DV360") and ([taxonomy_field] = "Insertion Order"))[expected_pattern]

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

= Table.SelectRows(#"A: Taxonomy - Expected Patterns", each ([taxonomy_date_source] = "DV360") and ([taxonomy_field] = "Insertion Order"))[expected_pattern]

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.