Forum Discussion
Slicer search recommendation
- 1 year ago
Hi maan98
Thank you for reaching out to the Microsoft Fabric Community Forum.
As pointed out by Deku , Power BI does not currently allow modification of the default slicer search behavior from "Contains" to "Starts With".This is a default and non-configurable behavior of the slicer search box and this behavior is not configurable through the standard Power BI interface.
As a workaound, please try the below solution:
1. Create a table in Power BI with sample search input values.SearchText = DATATABLE("Search", STRING, {{"A"}, {"B"}, {"C"}, {"D"}})
2. Add a slicer to a report using the SearchText[Search] column. Do not create any relationship between this table and main data model.
3. Create a calculated column or measure on main data table
StartsWithMatch =
VAR Input = SELECTEDVALUE('SearchText'[Search])
RETURN
IF(
NOT(ISBLANK(Input)) &&
LEFT(MainTable[TextColumn], LEN(Input)) = Input,1,0)
4. Use this column as a filter (MainTable = 1) in your report.
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank You!Microsoft Fabric Community Support
Hi maan98
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.