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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ianc33
Frequent Visitor

Remove rows matching slicer output

Hi Everyone,

 

I have a table which is similar to the below.

 

NAME, TAG

name1,tag1

name1,tag2

name2,tag1

name2,tag2

name3,tag1

name3,tag2

name4,tag1

 

Which is in a table visual.

 

If I was to slice the visual on tag2, i want another table visual that contains only name4 as it doesn't have tag2.

 

Is this possible?

 

Thanks in advance for your help.

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

Hi @Ianc33

 

Duplicate the table;

Then create a measure as below:

Measure = 
var _namesexclude=CALCULATETABLE(VALUES('Table 2'[NAME]),FILTER(ALL('Table 2'),'Table 2'[TAG]=SELECTEDVALUE('Table'[TAG])))
var _nameremain=EXCEPT(DISTINCT('Table 2'[NAME]),_namesexclude)
Return
IF(ISFILTERED('Table'[TAG])=FALSE(),MAX('Table 2'[NAME]),IF(MAX('Table 2'[NAME]) in _nameremain,MAX('Table 2'[NAME]),BLANK()))

And you will see:

Annotation 2020-08-10 164406.pngAnnotation 2020-08-10 164432.png

For the related .pbix file,pls see attached.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @Ianc33

 

Duplicate the table;

Then create a measure as below:

Measure = 
var _namesexclude=CALCULATETABLE(VALUES('Table 2'[NAME]),FILTER(ALL('Table 2'),'Table 2'[TAG]=SELECTEDVALUE('Table'[TAG])))
var _nameremain=EXCEPT(DISTINCT('Table 2'[NAME]),_namesexclude)
Return
IF(ISFILTERED('Table'[TAG])=FALSE(),MAX('Table 2'[NAME]),IF(MAX('Table 2'[NAME]) in _nameremain,MAX('Table 2'[NAME]),BLANK()))

And you will see:

Annotation 2020-08-10 164406.pngAnnotation 2020-08-10 164432.png

For the related .pbix file,pls see attached.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@Ianc33 ,

You can get a table like

table = except(all(Table1[Tag]), allselected(Table1[Tag]))

 

or can get measure and add it visual

measure = count(countrows(Table), filter(all(table), not(Table1[Tag] in values(Table1[Tag]))))

vanessafvg
Super User
Super User

unless i misunderstand you you can filter your table visual with the filter on the right hand pane for that specific visual and also set your edit interactions to ignore any slicers on that visual.

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi Vanessafvg,

 

Thanks for taking the time to reply.

 

What I'm looking for is,

 

1 table visual that shows the matching data and a second that shows the non-matching data from the slicer

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.