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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kouter
Advocate I
Advocate I

Reference multiple filters that filter on same column

Hi,

 

Is it possible to reference multiple filters that filter on the same column, i.e. Filter1 filters on table[attribute] and so does Filter2. And I do not know what the user will choose.

 

The end goal is to use these rows that are filtered by each filter in a measure.

 

Thank you very much for your help.

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @kouter ,

 

I checked your previous post and tried to understand what your problem is.

You want to implement a dynamic filter, and it's multiple selection, right?

If so, you can create a slicer using [Attribute] column.

Below measure returns the sum of [Value]. In the slicer, hold down Ctrl and click the mouse to select multiple attributes.

 

Measure = CALCULATE(SUM('Table'[Value]),ALLSELECTED('Table'))

 

vstephenmsft_0-1675758141128.png

As you can see, if you use a field from the main table as a slicer, then the rows of your table visual will be filtered. If you don't want the rows to be filtered out. You can create a field that is not connected to the table as a slicer to resolve.

Below the field of the slicer is from the calculated table by DAX.

 

Table 2 = DISTINCT('Table'[Attribute])

 

vstephenmsft_1-1675758468977.png

 

Measure 2 = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),[Attribute] in ALLSELECTED('Table 2'[Attribute])))

 

Here, [Attribute] in ALLSELECTED('Table 2'[Attribute]) can be used for multi-select slicers. You'll see that rows of the table visual aren't filtered by the slicer because they're not relevant. However, the filter in the measure comes from the slicer, and the results are affected.

vstephenmsft_2-1675758573274.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Hi @v-stephen-msft 

 

Thank you very much for your response. 

 

I figured out I can use two different calculated tables to distinguish the filters

 

filter1 = DISTINCT(table[attribute)

filter2 = DISTINCT(table[attribute])

 

I want to use filter1 to filter the attribute column which will return its corresponding values, and then use filter2 to filter the attribute column which again returns its corresponding values. And then multiply these values with each other on a row by basis.

 

Any suggestions is much appreciated.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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