Forum Discussion
Filter visual to NOT show selected value
Hello Friends,
I have an interesting scenario as a result of COVID-19 I'm trying to see if I can track people that may have come in contact with each other on a bus. The basic setup is a drop down slicer with a list of IDs and a table visual that shows the IDs and bus # for a date range.
The trick that I'm not sure how to do is to filter the visual for what was NOT selected in the slicer. for example
ID Bus Day
1 1 1
2 1 1
3 1 1
1 2 2
4 2 2
5 2 2
so lets say in my slicer I select ID 1
The table should then show the following IDs
ID
2
3
4
5
If ID 2 was selected in the slicer then I would see
ID
1
3
Any ideas on how to make this work?
thank you for your help and suggestions.
graphIt that is an easy fix, I was not sure if you want to selected id or not.
Measure = VAR __selectedId = SELECTEDVALUE ( Slicer[Id] ) VAR __buses = CALCULATETABLE ( VALUES ( Data[Bus] ), Data[Id] = __selectedId ) RETURN CALCULATE ( COUNT ( Data[Id] ), __buses, KEEPFILTERS ( Data[Id] <> __selectedId ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
6 Replies
- parry2kSuper User
- graphItFrequent Visitor
Thank you parry2k
the sample you provided doesn't quite solve issue, but it does give me some ideas to try.
It is close though. The idea is, with the sample you provided, if ID 2 was selected in the slicer then it should not show in table visual.
I'll play around with this some more. Thanks for the suggestion.