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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JimiH
Frequent Visitor

Nesting #Filtered Rows in an IF statement?

Hello

 

I have a parameter setup that filters a number of quieries & charts I have setup.

 

Parameter Values are = "All,1,2,3,4,5,6,7,8,9,10,11"

 

Now the numerical values work fine but I also want to filter by 'All' the numbers also.

 

I'm thinking if I could have a nested query something like the following ,obviously the formatting would be different 🙂

 

let
    Source = Sql.Database("server1", "APro"),
    dbo_OEE_FOR_BI = Source{[Schema="dbo",Item="OEE_FOR_BI"]}[Data],

IF LineNumberPar = (1-11) then filter like the below

    #"Filtered Rows" = Table.SelectRows(dbo_OEE_FOR_BI, each [LocId]=LineNumberPar)

Else

Include all the records from Item="OEE_FOR_BI

in
    #"Filtered Rows"

 

Is that the right track?

 

Regards

 

Geoff

 

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@JimiH,

 

In your scenario, you want to do it in your Power query, right? Actually, this requirement can be done by using Slicer easily. We can turn on Select All option.

Capture.PNG

 

Besides, here is a blog about IF statement in Power query for you reference.
http://www.excelguru.ca/blog/2014/08/27/the-if-function-in-power-query/

 

Regards,

Charlie Liao

 

View solution in original post

2 REPLIES 2
v-caliao-msft
Microsoft Employee
Microsoft Employee

@JimiH,

 

In your scenario, you want to do it in your Power query, right? Actually, this requirement can be done by using Slicer easily. We can turn on Select All option.

Capture.PNG

 

Besides, here is a blog about IF statement in Power query for you reference.
http://www.excelguru.ca/blog/2014/08/27/the-if-function-in-power-query/

 

Regards,

Charlie Liao

 

Right ok ,maybe I over think things

 

Cheers

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors