Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
See, i have a list box showing all survey ids in my dashboad. Now when i do some selections, only those survey ids which are relevent to the selections will be seen in white and others will be in gray..yes, expected behaviour of qlikview.
Have a look at the below states of the mentioned list box..
Here , the figure 1 shows the default view of the list box when no selection is made.
Figure 2 shows the state of the listbox when some selections are made..see the scroll bar position, I have to scroll all the way towards right passing all grayed out surveys to find the relevent ones (in white) for the current selection.
Now my requirement is that, when I do some selections in other filters, i want to see only the active survey ids for that selection, in this list box. That means, I dont want to see gray color in this list box anytime.
There is an option in the list box properties which says 'Hide Excluded' ..i tried this, and when that option is enabled, the excluded survey ids are no longer shown but the vast area of gray option still exists making me to scroll all the way towards right to find the active survey ids. See in figure 3
Do anyone have any suggestion to help me achive my requirement?
to explain this,
{<SURVEY_ID= P(SURVEY_ID),[Survey Type]= {'Outside'}>}
P() function in P(SURVEY_ID) means Possible. We just Set SURVEY_ID (with the function Only()) to Possible value (which is your selection)
well set analysis is somewhat like if statement^^
=aggr(only({<SURVEY_ID= P(SURVEY_ID),[Survey Type]= {'Outside'}>}SURVEY_ID),SURVEY_ID)
so here we only set the values of SURVEY_ID to appear if SURVEY_ID = P(SURVEY_ID (or Possible or Selected value) AND if [Survey Type]= {'Outside'} (Survey type is outside)
we combined it with only function, well to make the values of SURVEY_ID ONLY if your condition is met
and Aggr() function. we used it here coz we will get an error with only function without aggr-ing it^^
I dont know if I explained it clearly, Sorry in advance if its hard to understand me lol
Regards,
Alex
Set the listbox sort to "Auto Ascending". This will cause your white entries to sort to the top of the listbox.
-Rob
Hi, As Rob has mentioned you could sort the list box and it would make the available entries to be on the top.
Regards, Subin
Hi Rob and Subin,
I tried this, but it is not working.
Even after checking the sort by state as auto ascending, the whicte entries are not shown at the begining
in that case be sure that no other option is selected (numeric value or text)
Hi,
can you try this?
go to your listbox properties
under "Fields", Select "Expression"
then type or copypaste
=aggr(only({<Surveys= P(Surveys)>}Surveys),Surveys)
under Title:
type "Surveys"
Hope this can help you^^
Best Regards,
Alex
Alex,
The expression that I was using in list box (to filter the Survey IDs) till now was
=if([Survey Type]='Outside',SURVEY_ID)
Incorporating the expression you mentioned will result in something like this,
=aggr(only({<SURVEY_ID= P(SURVEY_ID)>}SURVEY_ID),SURVEY_ID)
In this, can you help me to include the [Survey Type] fiter condition also, so that I can try..
I tried but I am unsure about the syntax and it is failing.
Alex,
Thanks a lot ..I think I got it.. can you please check the below expression and confirm if I got it right?
=aggr(only({<SURVEY_ID= P(SURVEY_ID),{[Survey Type]='Outside'}>}SURVEY_ID),SURVEY_ID)
Also, it would eb great help if you could explain this..like what the expression means..(am not that much into set analysis..and is eager to learn)..so that it would help me tackle set expression related challenges in future.
Hi,
here^^
=aggr(only({<SURVEY_ID= P(SURVEY_ID),[Survey Type]= {'Outside'}>}SURVEY_ID),SURVEY_ID)
the curly bracket should e placed after your = sigh
{[Survey Type]= 'Outside'} should be [Survey Type]= {'Outside'}
glade to have helped you^^
Regards,
Alex
to explain this,
{<SURVEY_ID= P(SURVEY_ID),[Survey Type]= {'Outside'}>}
P() function in P(SURVEY_ID) means Possible. We just Set SURVEY_ID (with the function Only()) to Possible value (which is your selection)
well set analysis is somewhat like if statement^^
=aggr(only({<SURVEY_ID= P(SURVEY_ID),[Survey Type]= {'Outside'}>}SURVEY_ID),SURVEY_ID)
so here we only set the values of SURVEY_ID to appear if SURVEY_ID = P(SURVEY_ID (or Possible or Selected value) AND if [Survey Type]= {'Outside'} (Survey type is outside)
we combined it with only function, well to make the values of SURVEY_ID ONLY if your condition is met
and Aggr() function. we used it here coz we will get an error with only function without aggr-ing it^^
I dont know if I explained it clearly, Sorry in advance if its hard to understand me lol
Regards,
Alex