Power BI: display table result containing key word based on main value filter
Most of the time, columns have multiple values but it may happen that one of those columns are linked to my filter and this filter, only contains main criterias so not all values of the columns. May be, I am not very clear so for instance, I have this table and this slicer:

The slicer only contains the main values which are DB, NT and UX but if I select UX, my table will show only UX:

It doesn’t display the INC003 and INC006, as we can see, both contain UX in the “support” column. As you may guess, what I want is that if I select UX, I want to see all UX and not some of them. To get the desired result, there are 2 important things to do:
- Create a new measure telling it to look for all main criteria for the table
- Delete or de-activate the relationship
For the measure, the formula:
SEARCH(SELECTEDVALUE('table1'[argument]),SELECTEDVALUE('table2'[argument]),,0)
NOTE: if it is numbers that include 0 instead of words, change 0 by -1.

Put it in the “filters” panel (not in the “visualizations” panel) of the table and configure/select as shown in the picture:

Next, I need to delete or de-activate the relationship so now, if I select back UX, I got all results

But the counting is showing 10 instead of 5, this is because I remove the relationship. To remediate it, I will need to do some changes, first the filter, I will add “all” then for the selection, use “single select”:
![]() |
![]() |
I will add a new column to include “all” in the support like that:

In the first measure, I will put the new column:

And at last, I will create a new measure with this formula:
CALCULATE(COUNT('table1'[argument1]),CONTAINSSTRING('table1'[argument2],VALUES('table2'[argument])))


Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...
-
Refresh Power BI
From the Power BI Service, I can set refresh but, for instance, there is no option to do it monthly or each time a change is made...
-
Power BI alerts to be sent by email from an excel file based on condition
I will explain how to send a list of emails from an excel file after creating alerts...