Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day one and all,
I am having a minor frustration with something relating to variables, filtering and clearing said filters.
I have a variable which toggles between being set as 'Admitting' and 'Discharging'. In a chart I am using a calculated dimension which uses the variable to determine whether to bring in the admitting column or the discharging column.
E.g. with the variable set to 'Admitting' the admitting column values display along with the related vales in contained with the expression:
If a value from the admitting column is selected, the data is filtered to show just this value (which is what I would be expecting).
Normally in Qlikview you click on the value again (in this case Medical Oncology) to clear the filter/selection. This is where I am having the issue, as no amount of clicking will clear the filter/selection. The only way is to use clear all or the back button - neither of which are ideal.
Does anyone have any experience of this? Is this something that is just a quirk of Qlikview (due to using a variable) or is it something that can be resolved?
Many thanks
Tim
Well, since you're using a calculated dimension that uses two dimensions in the expression, when you click on a bar then values are selected in both fields. What you can do instead is use a variable as calculated dimension and calculate which dimension should be used in that variable. See attached example.
When I have hit this problem in the past, I've been able to get around it by wrapping my calculated dimension in the aggr() function.
Well, since you're using a calculated dimension that uses two dimensions in the expression, when you click on a bar then values are selected in both fields. What you can do instead is use a variable as calculated dimension and calculate which dimension should be used in that variable. See attached example.
Thank you Gysbert! That's exactly what I needed. I had actually made a stab at this earlier but hadn't quite got the syntax right so your example sorted that out for me.
Really appreciate your help.