Hi,
I'm a bit stuck on how to filter a Show-hide measure I created. To give some context, I have a slicer with the following selections: Georgia and Florida. The slicer is connected to a graph that shows diabetes incidence rates for "Florida" or "Georgia" based on age groups depending on the selection in the slicer.
Additionally, I have a cards that show incidence rates for Florida or Georgia based on the age groups. When Georgia is selected, I wanted the card for "14 and under" to come up blank so I created the Show-hide measure shown below to do this. I formatted the specific card to show white font when Georgia is selected, since the background is white, the card looks blank.
ShowHide Graph State= if(selectedvalue(slicer_DoseSelector[Column1]) = "Georgia",1,0)
Up until this point the graph with the slicer and "14 and under" card work perfectly.
Now I have to update the graph to exclude the "4 years and under" age group if "Georgia" is selected. I thought it may be possible to do this by using a similar measure and adding a filter statement so I tried the measure below: ShowHide Graph Age. I'm not sure if there is a better approach to filter out a specific age group in a graph based on a slicer selection.
Solved! Go to Solution.
If I understand correctly, you will have to modify the measure you are using in the graph to show the data rather than adding a "ShowHide" measure. The use case is different from the one in the card visual, since here we are talking about modifying the result instead of showing it or not.
Can you show the code for the main measure in the chart? Plus the structure of the relevant tables involved in that measure.
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
If I understand correctly, you will have to modify the measure you are using in the graph to show the data rather than adding a "ShowHide" measure. The use case is different from the one in the card visual, since here we are talking about modifying the result instead of showing it or not.
Can you show the code for the main measure in the chart? Plus the structure of the relevant tables involved in that measure.
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Thank you for all your help! I modified the measure I'm using in the graph by adding a filter to it and that did the trick. Thanks again!
Hi @oaz18
There are several major issues with the syntax of that code.
In any case, I would need first to understand what you want to do. What do you mean exactly by "I'd like to add a filter so anyone 4 years and under is also removed. This measure is then used to filter a graph. "
Removed from where?
What do you mean by a measure filtering a graph?
Can you provide an example based on sample data to elaborate on the requirements? Include the expected result.
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Thank you for your help and apologies for not being more clear. I updated the post with more details on the issue I'm stuck. I hope it's a little clearer this time.
User | Count |
---|---|
98 | |
30 | |
29 | |
18 | |
15 |
User | Count |
---|---|
103 | |
24 | |
21 | |
20 | |
17 |