If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I have a dimension of my visual (Field name : 'LAG' | Possible values : '1','3','6','12',)
which I want it to have the following behavior:
At least one value selected (predefined '3')
So the user should be able to :
1 - change from 3 to any other value
2 - add multiple values
I only want this action activated on a selected sheet and not for all the App.
I tried adding action " Select values in a field"
with value ='('&if(GetSelectedCount( LAG )=0,GetFieldSelections( LAG) )&')'
but is not working.
Anyone can support on this?
Thanks in advance for helping
You could try this one for the action "Select value in a field":
=If(GetSelectedCount(LAG ) = 0, '3', GetFieldSelections (LAG ,';'))
This action will be trigger when you open the sheet, if nothing is selected for LAG field then '3' will be selected; if there are existing selections for LAG field then selections remains.
Thank you for your support and your reply.
Actually this solution is triggering on selection "3" when the sheet is opening, but not preventing the user to cancel the selection, leaving at least one value selected.
Do you know if exists the possibility of apply this behavior?
Thanks in advance
There are some additional options:
1. Set the field LAG option to always one selected value, so user can not clear the selection. But in this case, user can not select more than one value.
2. Using extension for your filter: I suggest using this extension https://github.com/mediassarQlikBranch/SimpleFieldSelect
You need to create a filter by the extension in the sheet you want to apply your logic. For example I am setting default AR value for my State field:
by using this, you will achieve:
+ Always have your default value selected (even clicking the clear selection in the current sheet - you can clear selection in other sheet which doesn't contains this filter)
+ Able to select multiple values
+ Keep current selection on that field when moving from other sheet to this sheet ( if nothing is selected, default value will be applied)
p/s: you can change the filter style under dimensions/visualization to checkbox, listbox, qlikfilter style...