Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i want to create an app with several listboxes for the user to easily assemble their analysis:
The first listbox ('mode') is set by a bookmark and contains lets say the values Departure and Arrival.
The next few filter are for selecting the timespan you want to have a look at. But these depend on the selection made in 'mode'. E.g. if Departure is selected the second listbox should contain the field 'Departure_Date_Year', if 'Arrival is selected it should contain 'Arrival_Date_Year'.
In QlikView there was the option to have a condition under the layout tab. So you could have 2 listboxes at the same position and hide them based on the selection in the first listbox.
In QlikSense this option is missing, so this is what i tried using in the dimension if the second listbox:
=if(GetFieldSelection(mode)='Departure', Departure_Date_Year,
if(GetFieldSelection(mode)='Arrival', Arrival_Date_Year)
But when I make a selection in this second listbox and the mode was for example on 'Departure' it also makes a selection in 'Arrival_Date_Year'.
Can someone help me with this? Or give me another workaround for not having the option to hide listboxes via conditions in QlikSense?
Thanks!
Maybe you could use an (adhoc) variable, like:
[$(=if(GetFieldSelection(mode)='Departure', 'Departure_Date_Year', 'Arrival_Date_Year'))]
- Marcus
Thank for your reply Marcus.
When I apply your proposal to my listbox in the Dimension, I only get an error...I never worked with an adhoc variable, could you further elaborate?
It means that $(= ...) is evaluated before everything else and replaced with the calculated content - as if you had written it manually. I'm not sure if Sense supports this kind of $-sign expansion so just apply it or something simpler like: $(=num(today())) within a text-box to see if it's resolved. If it's calculated it means that there is any small mistake maybe with the quotes, brackets or the spelling. If not you couldn't apply this method directly and you may need to apply the calculation to a named variable which you then calls in the list-box.
- Marcus