Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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! 🙂
Solved! Go to Solution.
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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHmm, 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.
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.
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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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!
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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix,
Would you be able to direct me to a tutorial or some simple documentation that would show me how to create a calculate measure to create a chart?
Thanks very much for your help.
JWorthy
Hi @JWorthy,
One good way to start is to take the SQLBI training (it's free) also check the site for nice tutorials and information.
But be aware that to have a good experience with DAX you need first to understand it's concepts.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
116 | |
73 | |
60 | |
48 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |