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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Mahmed1
Helper IV
Helper IV

Not text starts with

Hi

 

what is the best way to have a table where i can have an exemption list but in the mcode have it look at this table to filter out all the codes that does not start with everything in this table

 

ive got code that does it with

each list.contains([code] = tbl_exemption_list)

 

how can I achieve the same this but replace with text does not start with? At the moment im having to keep adding it manually into power query

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

Hi, @Mahmed1 

 

        Table.SelectRows(
            your_table, 
            (x) => 
            not List.AnyTrue(
                    List.Transform(
                        exemption_list, 
                        (t) => Text.StartsWith(x[code], t)
                    )
                )
        )

 

but exemption_list must be a list, not table. I hope you know how to get a list from a column of your table. And buffer this list before usage (outside of Table.SelectRows). 

View solution in original post

5 REPLIES 5
AlienSx
Super User
Super User

@Mahmed1 your_table is your prev step

Mahmed1
Helper IV
Helper IV

Thank you - ill try and give that a go

Where you put your table, do you mean refer to previous step or the exemption list table?

Mahmed1
Helper IV
Helper IV

Thank you

the way i did it was - right click - drill doen column to change to list

 

that right?

basically, yes. 

AlienSx
Super User
Super User

Hi, @Mahmed1 

 

        Table.SelectRows(
            your_table, 
            (x) => 
            not List.AnyTrue(
                    List.Transform(
                        exemption_list, 
                        (t) => Text.StartsWith(x[code], t)
                    )
                )
        )

 

but exemption_list must be a list, not table. I hope you know how to get a list from a column of your table. And buffer this list before usage (outside of Table.SelectRows). 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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