Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
yanivvl0
Contributor III

How to set compicate filters , include muliple fields ?

hi to all ,

i need to set compicate filter on my model , I have BlackID and  ID_DATE ,

The supose to be like that :

SHOW ALL BigID's WITH  ( (  BlackID = 6 and ID_DATE >= 01/01/1992 ) or  BlackID = 42 and ID_DATE >= 01/01/1992 )  )

is there any way to set it on list-box advance search , or as bookmark , or any other way ?

THANKS!!BLACK DATE FILTERS.PNG

1 Solution

Accepted Solutions
yanivvl0
Contributor III

Re: How to set compicate filters , include muliple fields ?

how can i do it , dont see in edit the option.

11 Replies
vinieme12
Esteemed Contributor II

Re: How to set compicate filters , include muliple fields ?

Use Set Analysis

Count({<BlackID = {6} ,ID_DATE = {">= 01/01/1992"} >} BigID)


or


Count(if(BlackID=6 and ID_DATE >= 01/01/1992, BigID))

yanivvl0
Contributor III

Re: How to set compicate filters , include muliple fields ?

hi Vineeth , i need to filter all model , so the population will be according to the condition .

vinieme12
Esteemed Contributor II

Re: How to set compicate filters , include muliple fields ?

do you mean in the load script?

laddu_927
Valued Contributor

Re: How to set compicate filters , include muliple fields ?

Hi Yaniv,

I think the value 6,42 and date are something that you should be able to select in filter.??

If the user selects multiple BlackIDs you need the union of data of all the blackIDs.??

If Yes, Maybe you can use filters for BlackID and Id_Date and write set analysis to get the data, like Vineet mentioned something like Count({<ID_DATE = {">= $(=Max(Id_Date ))"} >} BigID). This will get the data of all the blackIDs selected and for each blackId it will check if the date is greater than or equal to the Id_Date selected in the filter.

Re: How to set compicate filters , include muliple fields ?

Another solution could be

You can create one button on which you can set the action to select all the BigIDs

Button->Action->Add->Select in field

Field -> BigID

Search string->

='( '& Concat( distinct if(((BlackID = 6 and floor(ID_DATE) >= floor(date#('01/01/1992','DD/MM/YYYY')) or  ( BlackID = 42 and floor(ID_DATE) >= floor(date#('01/01/1992','DD/MM/YYYY')),chr(34)&BigID&chr(34)),'|') & ')'


On clicking of this button all the BigIds will get selected


Re: How to set compicate filters , include muliple fields ?

Are you looking to select a particular row which meets the condition or if one of the row meets the condition, you will select the whole BigID? If you are looking to select a particular row, I think you will need to have a unique identifier.

Would you be able to share a qvw with your expected output?

yanivvl0
Contributor III

Re: How to set compicate filters , include muliple fields ?

hi to all , i solved the problem in the DB level , thanks !!

laddu_927
Valued Contributor

Re: How to set compicate filters , include muliple fields ?

Nice Please close the thread.

yanivvl0
Contributor III

Re: How to set compicate filters , include muliple fields ?

how can i do it , dont see in edit the option.