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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
rpiboy_1
Helper V
Helper V

Nesting Queries

Hi all, I've tried this several ways and not getting the result I'm expecting. Here is my scenario:

 

Let us say that I have Query Alpha that the result looks like this.

Alpha

IDNamePropertyBoolean

1

Name1Property1True
2Name2Property2False
3Name3Property3True

 

Now, I'm writing a query called Beta, in Beta I want to use #"Alpha"[Name] as a list, but I need to filter on the [Boolean] value.

 

I of course can write this additional query that references #"Alpha" and will return the Name column as a list that has been filtered.

 

 

let
   #"Filtered Rows" = Table.SelectRows(#"Alpha", each #"Alpha"[Boolean] = true,
   #"Name" = #"Filtered Rows"[Name]
in
  #"Name"

 

 

 

#"Name"

List
Name1
Name3

 

Where I'm having trouble is I want to direclty incorporate the above query into Beta, so that it looks something like this... (but the derivations I've tried have not worked). For the purposes of this example, we'll assume the data in #"SomeQuery" looks like as follows:

 

SomeQuery

Name 1Column2Name3Column4Column5
<value><value><value><value><value>
<value><value><value><value><value>

 

Beta

 

 

let
  Source = #"SomeQuery"
  #"Removed Other Columns" =
    Table.SelectColumns(
        Source,
        let
          #"Filtered Rows" = Table.SelectRows(#"Alpha", each #"Alpha"[Boolean] = true),
          #"Name" = #"Filtered Rows"[Name]
        in
          #"Name"
    ),
  #"NextStep" = <some other transformation>(#"Removed Other Columns", ...),
  .....
in
  #"LastStep"

 

 

 

The result of #"Removed Other Columns" should look like:

 

#"Removed Other Columns"

Name1Name3
<value><value>
<value><value>


I've tried several different syntaxual approaches and I'm not getting the result I expect, which is to carry on with the other steps. Instead I get the result of #"Name" not #"LastStep".

 

Thanks!

3 REPLIES 3
rpiboy_1
Helper V
Helper V

Bumping this up as I was hoping someone could lend some advice/input.

AntrikshSharma
Super User
Super User

@rpiboy_1 Share a mock up of the data with the code that you can written so far, you can share the file using google or onedrive.

I've added some additional detail to the original post to help further clarify the desired result and the form of the input.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors