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

Filter table based on column value starting with

So I have a table, with many columns, and one column which is "serial_number". Below my table, I want to have a button that when clicked (like an on/off switch) would show ONLY the table rows for which the string in the column "serial_number" starts with "XWW".

 

For example :

 

description     serial_number     id     
computerXWWRHG67133
computerXWWJKM88194
computerZHXWEK99211

 

When clicking on the button, it should filter out the last line, because the serial_number does NOT start with "XWW". 

Thanks

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Anonymous 

This can be achieve using bookmarks. 

You can create one bookmark by adding advance filter as starts with on serial_number column 

Samarth_18_0-1626397028376.png

and add one more bookmark without filter for "off" condition

 

Samarth_18_1-1626397103851.png

Now you add two buttons one for on and one for off. Put action type as bookmark and select respective bookmark for your button action

Samarth_18_2-1626397280446.png

 

Thanks

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

6 REPLIES 6
Samarth_18
Community Champion
Community Champion

Hi @Anonymous 

This can be achieve using bookmarks. 

You can create one bookmark by adding advance filter as starts with on serial_number column 

Samarth_18_0-1626397028376.png

and add one more bookmark without filter for "off" condition

 

Samarth_18_1-1626397103851.png

Now you add two buttons one for on and one for off. Put action type as bookmark and select respective bookmark for your button action

Samarth_18_2-1626397280446.png

 

Thanks

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

OK I figured it out. Had to go to the View menu and select "Filters" and "Bookmarks" to display these 2 panes. Then with the table selected, expand the "serial_number" filter in the filters pane. Select "advanced filtering" then "starts with" then add "XWW", then switch to the bookmarks pane and hit "Add" which will create a bookmark with this filter "on". Do the same for the "off" state. Then add the related buttons by going to the "Insert" menu and select "Buttons" and "Blank" and create the button with whatever text and choose "Bookmark" as the button type in the "Actions" section. So intuitive.

You got it absolutely correct. I was just taking screenshots for you only.😊

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Power BI being the least intuitive app I have ever used in my life (along with other Microsoft products), I am still stuck as I don't know how to "create one bookmark by adding advance filter as starts with on serial_number column" - No idea how I should do that.

Jihwan_Kim
Super User
Super User

Picture1.png

 

Link to the pbix file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

As a begginer, I would appreciate instructions on how you created that...

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.