Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Based On Current Selections

Hello All,

    I have a List Box, which on selecting displays all the selections based on primary indicator Y or N. But my requirement is to first check whether current selections have the Spouse selected along with Name, if Selected then should display only the Id's with Prim Ind ='Y'. Based on the Current selections of ID it should display both Prim Ind is Y or N but only if current selections don't have spouse selected. I have attached the sample excel file and QVW. Let me know how we can do this?.

4 Replies
Not applicable
Author

Possibly add the flag to your table that comply all the conditions and use flag in your List Box expression.

Not applicable
Author

I tried with the flag but I still couldn't get the correct result. I need to get the ID's from the current selection and possibly match those with the P(Spouse ID). I am figuring out how we can do this on front end based on current selections.

adamdavi3s
Master
Master

Its late and my brain isn't quite working, but does this do what you need?

= if((aggr(count(TOTAL [SpouseCount]),ID)>1 and [Prim Ind]='Y') OR (aggr(count(TOTAL [SpouseCount]),ID)=1) ,Name)

Not applicable
Author

Davies,  I had written the similar expression but it's still doing the same thing as before like removing the [Prim Ind]='N' values.  Actually my scenario is I should get distinct Spouse values based on PrimaryID. The PrimaryID is same for both prim Ind= Y and Prim Ind =N, but when both are in the current selections I should get only Prim Ind='Y' when List is selected. when only one spouse is in the current selections I should get it displayed when List is selected.  This is really tough but there might be some way to do it but couldn't figure out.