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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
mrupsidown
Helper I
Helper I

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 @mrupsidown 

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 @mrupsidown 

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

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

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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