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
PelaezLink
Helper I
Helper I

What to change on Text Filter visual source code to use exact match search instead of contains.

Hello guys. 

 

So I found that the source code for the Text Filter Visual is avalible on:

 

https://github.com/microsoft/PowerBI-visuals-TextFilter

 

I am currently using the filter but the search uses a "Contains" search, meaning that it will search for any appearence of certain characters. I need to have this same visual but with an exact match search, so I only get results for the exact characters I typed. So I download the source code and changed the code to make it work this way. The only thing I saw that would work is on src/visual.ts on line 191, change operator "Contains" for "Is". Then I packaged the visual and exported it to Power BI desktop but is working in the same way as the normal Text Filter, is not using an exact match search, I did not changed anything else in the source code. I don't know if it is because it has already saved the data for the normal visual or what. In any case I was wondering if any of you would know what should I change in the source code in order to make it work as intended.

 

Also if you know any other way to have something like the Text Filter visual but with exact match it would be great.

 

Thanks a lot.

Luis.

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @PelaezLink,

If that's all you've changed, then when you package and load the visual, Power BI will recognise that the visual's GUID matches the one already in AppSource and will load that one from there. This is a way of ensuring that AppSource visuals always stay current and creators don't have to manually update them.

You will also need to change the guid property in pbiviz.json  to something unique - you could add a number to the end, or prefix it with 'PalaezLink' or whatever; just enough to make it a guid that is not already registered in AppSource.

Note that by doing this, this visual will no longer be certified as it's no longer tied to the version in AppSource. If you need it to be certified, you will need to publish your visual to AppSource yourself and go through the certification process. You can read about this here.

With this 'uncoupled' version working, you'll get some bonus formatting changes that I submitted a couple of years ago. These have been approved by MS, but I don't think that they are planning to update the published version with anything new, so you may at least find them useful.

Good luck!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
Guirikiki
Frequent Visitor

Hello,

 

Is it possible to share the adapted visual file? In order to take into account the exact search.

 

Or is there a method to easily recompile modified code into a visual file?

 

Thanks a lot!

Guillaume

PelaezLink
Helper I
Helper I

Thank you very much! That worked perfectly.

dm-p
Super User
Super User

Hi @PelaezLink,

If that's all you've changed, then when you package and load the visual, Power BI will recognise that the visual's GUID matches the one already in AppSource and will load that one from there. This is a way of ensuring that AppSource visuals always stay current and creators don't have to manually update them.

You will also need to change the guid property in pbiviz.json  to something unique - you could add a number to the end, or prefix it with 'PalaezLink' or whatever; just enough to make it a guid that is not already registered in AppSource.

Note that by doing this, this visual will no longer be certified as it's no longer tied to the version in AppSource. If you need it to be certified, you will need to publish your visual to AppSource yourself and go through the certification process. You can read about this here.

With this 'uncoupled' version working, you'll get some bonus formatting changes that I submitted a couple of years ago. These have been approved by MS, but I don't think that they are planning to update the published version with anything new, so you may at least find them useful.

Good luck!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




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.