Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikviewrs!
For example, I have countries & for each I have states defined.
So two field : Country & States
In the first list box I select a country.. In another list box I want only the states of that particular country to be visible.
But i also have some grey area when i try to hide the states of unselected country,
How do i avoid it?
Note*: Both the size(LxB) should be the same.
Please find the attached example to try it out. Thanks
BR/ Subin
Hi Subin,
Create a variable, vStates and set to:
='ValueList(' & Chr(39) & Concat(DISTINCT States, Chr(39) & ',' & Chr(39)) & Chr(39) & ')'
Then, in the listbox just use =$(vStates)
See attached,
Hope this helps,
Jason
Hi Subin,
Create a variable, vStates and set to:
='ValueList(' & Chr(39) & Concat(DISTINCT States, Chr(39) & ',' & Chr(39)) & Chr(39) & ')'
Then, in the listbox just use =$(vStates)
See attached,
Hope this helps,
Jason
Thanks mate! It worked well
Hmmm - just realised that this solution will not allow you to select a state! There is a simpler way - in the listbox just use:
=Aggr(States,States)
Jason
Hi Jason,
I totally overlooked it. thansk for the reply again. But I have got another problem now.
As soon as I select a state the other options gets hidden. Can it be in any way even make them always shown?
Why don't you like the standard QV functionality here? Select a Country and all associated States are in white, unassociated in grey. Select a State and it goes green, all others go grey. It's clean and clear!
Hi,
I strongly agree with Jason. Probably you should try to educate the EU about QV associated logic. Anyway if you still wanted a solution then please try this expression :
=Aggr(MAXSTRING({1*$<[States]={'*'}>} [States]), States)
And I'm attaching the sample application.
Cheers,
DV