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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
swagga90
New Member

How to use multiple selections in slicer to show results containing ALL of those values

Hello all,

 

I am fairly new to PowerBi and I'm working on a dashboard that takes selected jobs and shows the different procedures that contain those jobs. However, when selecting multiple jobs, the resulting table produces procedures that contain 1 or all of the selected jobs, and I would like for the table to show results of procedures that at minimum contain all of the selected jobs (essentially it's a filter that would filter based on an AND function of the selected jobs). Furthermore, I'd like to make a separate filter that shows results that only contain those selected jobs and not more.

Here is an example of the two tables I'd want:

 

Selected Jobs: Job A, Job B, Job C

Table 1 with Filtered Results should show:

Procedure 1: Job A, job b, job c, job d

Procedure 2: Job A, Job B, Job C, Job D, Job F, jOB Z

Procedure 3: Job a, job b, job c

Table 2 with Filtered Results:

Procedure 3: job a, job b, job c

 

Currently, my table is producing results such as:

procedure 1

procedure 2

procedure 3

Procedure 4: job a

procedure 5: job a, job c, job d

 

Which contain all combinations of any of the selected jobs, but don't show the procedures that at minimum have ALL the selected jobs.

 

Any thoughts on how to tackle this?

 

Many thanks.

 

Iwona

1 ACCEPTED SOLUTION
GuillaumePower
Resolver I
Resolver I

In fact your measure doesn't work because in your measure the selectedjobs  is always equal to the countrowsprostjobs, so it's a non sens to compare this two value. I've tested this in a same example :

GuillaumePower_0-1720877982683.png

GuillaumePower_1-1720878029523.png

You'll have the same result for each proc, like below :

 

 

GuillaumePower_2-1720878063105.png

so it's a non sense to try to know when  they are different :

if (countrowsprostdjobs>=countrowsjobs,countrowsprostdjobs,blank())

You can test this whith this powerbi : https://drive.google.com/file/d/1atacfNoV_bJ5GTH-RkqPSUzEz2tZESZM/view?usp=sharing

 

 

 

About what you have asked to clear the filter, you can use the Dax function Removefilter : you have to use something  like : countrows(filter(Table),removefilter()),

A good advice, it to test every part  of the measure that you re writing to find the right way to your duty.

 

 

 

 

 

 

View solution in original post

8 REPLIES 8
GuillaumePower
Resolver I
Resolver I

In fact your measure doesn't work because in your measure the selectedjobs  is always equal to the countrowsprostjobs, so it's a non sens to compare this two value. I've tested this in a same example :

GuillaumePower_0-1720877982683.png

GuillaumePower_1-1720878029523.png

You'll have the same result for each proc, like below :

 

 

GuillaumePower_2-1720878063105.png

so it's a non sense to try to know when  they are different :

if (countrowsprostdjobs>=countrowsjobs,countrowsprostdjobs,blank())

You can test this whith this powerbi : https://drive.google.com/file/d/1atacfNoV_bJ5GTH-RkqPSUzEz2tZESZM/view?usp=sharing

 

 

 

About what you have asked to clear the filter, you can use the Dax function Removefilter : you have to use something  like : countrows(filter(Table),removefilter()),

A good advice, it to test every part  of the measure that you re writing to find the right way to your duty.

 

 

 

 

 

 

GuillaumePower
Resolver I
Resolver I

I've begun to work with your code, I'll send you back tomorow a PowerBI file. But  it s important to know exactly what you do with the Dax. You need one month at  least to know well how to work with. (there is video course on  udemy for the Dax)

 

GuillaumePower_0-1720814162192.png

 

swagga90
New Member

Here is a modified (I've removed some of the details) screenshot of the visual itself: 

You select the jobs in the slicer at the top.

The table below it generates a list of procedures that contain those jobs. I've got it to the point that it displays the selected jobs as if it was an AND function, however, it shows procedures with the number of selected jobs as well as n-1. I used a measure that i found online for this AND-ONLY condition, but that example used two separate tables and i've been using only one table (data source) so perhaps something in that logic is flawed resulting in this odd behaviour.

In the example below, i have selected 6 jobs, and the resulting list shows a number of procedures. 1 of them has the 6 jobs in it and the other only have 5 of those 6. The other feature I'd like is for that table to show the total jobs in the procedure, regardless of the slicer selection. As you can see, to the table to the right, there are more than the 6 selected jobs. Is there a way to make a measure that calculates the total number of jobs irrespective of the filter/slicer applied? I've removed some details and changed names of some of the things for clarity, but I hope i didn't make it more confusing.

swagga90_6-1720800116695.png

 

 

Here is a snapshot of the table (data), 'Standard Job proc':

swagga90_4-1720799710997.png

 

And here is that measure that i used to filter the visualization with (it ends up being the column that says 'number of jobs matching selected job count'):

swagga90_5-1720800062383.png

 

 

GuillaumePower
Resolver I
Resolver I

Yes all the visuals and the table, (you can hide what you wan't not show). Think that we are in the same office, I would have to see your screen to really understand) Only 2 seconds to copy the text below in image.

GuillaumePower_0-1720793904330.png

 

swagga90
New Member

What screen are you hoping to see? The visual? The model between tables? 

GuillaumePower
Resolver I
Resolver I

There is certainly a mistake in your data model, you should show everything on the screen  to find what dosn't work. You can hide the  data that you don't want share but we can't help whithout a screenshot.

swagga90
New Member

It is one table that contains many columns. The two columns of interest are Job and Procedure. For each procedure, there can be a number of jobs, and so, each procedure will have n number of rows depending on what jobs are associated with it. In terms of the visual/page: The slicer uses the available job options from this table. The table visual gets filtered based on what jobs you select.

GuillaumePower
Resolver I
Resolver I

Hey, Could you show your data model ? I'm not sure that you have only one table or two?

Could you show us your screen ?

It is very easy to copy your screen here.

As you see below :

GuillaumePower_0-1720714328695.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.