Forum Discussion
Filter always on
Hello,
I've run a survey which has 5 questions. The questions have different answer options. I've created a slicer so the charts will show just answers from a single question.
I don't want the user to be able to turn off the filter. See the 1st image below for the problems that causes (it shows all of the answer options).
How can I set the slicer to always be filtering for one of the options (so they can't clear the filter)? It should look like the second picture.
Thanks for your help! :-)
Hi JWorthy,
Don't know if you are using measure to create your charts, but one way would be to wrap your measure around an error clause so that if people select more tha one option in the slicer it give error and no result on the chart something like this:
Count answer = IF ( DISTINCTCOUNT ( Table[Slicer] ) <> 1; ERROR ( "Onle one value per slicer" ); [Measure] )This will give you an empty chart.
Regards,
MFelix
7 Replies
- MFelixSuper User
Hi JWorthy,
Don't know if you are using measure to create your charts, but one way would be to wrap your measure around an error clause so that if people select more tha one option in the slicer it give error and no result on the chart something like this:
Count answer = IF ( DISTINCTCOUNT ( Table[Slicer] ) <> 1; ERROR ( "Onle one value per slicer" ); [Measure] )This will give you an empty chart.
Regards,
MFelix
- JWorthyAdvocate I
Hi MFelix,
This sounds promising. I'm not using a measure unfortunately, pretty new to this, so I wouldn't be sure how to build the chart using a measure and then use your suggestion.
Is there a way to work it into a chart I've created from the standard click and drag options?
Thanks!
- MFelixSuper User
Hi JWorthy,
This is not possible using only the point and click options.
Believe that you want people to have additional filter options otherwise you would not place the slicer on your report.
I would suggest to create a calculated measure to make the report results, and then wrapping it around the error message.
If you need any help is needed please tell me.
Regards,
MFelix
- Greg_DecklerCommunity Champion
Hmm, one way would be to put a 100% transparent rectangle graphic over top of the slicer. Impossible to click the slicer without removing the rectangle.
- JWorthyAdvocate I
Hi Greg,
Thanks for the suggestion. I'd still like users to be able to switch between 5 different filters. The trouble is when they remove all of the filters and the graph gets messed up (it effectively becomes meaningless) as in the first image.