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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Stoner
New Member

Filter row in table cell with dynamic list

I have grouped table cells in [Custom] and a list of row numbers in [Row].

[Custom] includes an index column that can match to the list in [Row]. I would like to filter the table contents in [Custom] without expanding it.

 

 

 

= Table.AddColumn(Source_Sheet, "Data", each
            Table.SelectRows(
            Table.AddColumn([Custom], "Row", each List.ContainsAny(Source_Sheet[Row]{0}, {[Index]})),
            each ([Row]=true)))

 

 

I currently use this formula which obtains the list from the first cell in column [Row] and applies it to the table (Row 0) but i would like it to dynamically reference the row which the table is in.

 

Stoner_0-1684382728052.png

is there are way to do that?

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

Hi, @Stoner are you trying to filter [Custom][Index] column by [Row] list? Then try this

step = 
    Table.AddColumn(
        Source_Sheet, "Data", 
        (x) => Table.SelectRows(x[Custom], (w) => List.Contains(x[Rows], w[Index]))
    )

View solution in original post

2 REPLIES 2
AlienSx
Super User
Super User

Hi, @Stoner are you trying to filter [Custom][Index] column by [Row] list? Then try this

step = 
    Table.AddColumn(
        Source_Sheet, "Data", 
        (x) => Table.SelectRows(x[Custom], (w) => List.Contains(x[Rows], w[Index]))
    )

Hi @AlienSx 

 

I'm getting the following error.

 

Stoner_0-1684441060062.png

 

For your reference, the list content in [Row] is not a column inside the [Custom] table. The two have been matched by merging queries.

 

---

Edit: Hi AlienSx, just noticed the column was Rows instead of Row. It works now, thank you very much!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Kudoed Authors