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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
goalie_
Helper III
Helper III

filter by intersection of filters for another column

When filtering for a column 1 by column 2, can you find the intersection of the selected elements(in col 2) to get items for col 1 rather than the union? i.e. (see image)download.png

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @goalie_ ,

 

Create an independent slicer table.

 

slicer = DISTINCT('Table'[var])

 

Then create the measures.

 

_flag = IF(SELECTEDVALUE('Table'[var]) in VALUES(slicer[var]),1,0)
 
_countf = CALCULATE(DISTINCTCOUNT('Table'[var]),FILTER(ALLSELECTED('Table'),'Table'[req]=SELECTEDVALUE('Table'[req])&&[_flag]=1))
 
Measure = IF([_countf] = COUNT(slicer[var]),1,0)
 
Add the [measure] to visual filter set value =1.
 
Result:
1.jpg
 
Best Regards,
Jay
Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @goalie_ ,

 

Create an independent slicer table.

 

slicer = DISTINCT('Table'[var])

 

Then create the measures.

 

_flag = IF(SELECTEDVALUE('Table'[var]) in VALUES(slicer[var]),1,0)
 
_countf = CALCULATE(DISTINCTCOUNT('Table'[var]),FILTER(ALLSELECTED('Table'),'Table'[req]=SELECTEDVALUE('Table'[req])&&[_flag]=1))
 
Measure = IF([_countf] = COUNT(slicer[var]),1,0)
 
Add the [measure] to visual filter set value =1.
 
Result:
1.jpg
 
Best Regards,
Jay
Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@goalie_ , try to use below measure with req in visual

measure =
var _cnt = calculate(distinctCOUNT(Table[var]), allselected())
return
countrows(filter(summarize(table, table[req], "_1", distinctCOUNT(Table[var])), [_1] = _cnt))

 

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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