Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

set analysis - union

Both the below expressions are working for me while trying to filter some records in a straight table.

only({<[StartDate]={"<=$(vStartDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vStartDate)"}>}[bkgno])

only({<[StartDate]={"<=$(vEndDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vEndDate)"}>}[bkgno])

I need to concatenate the results obtained through these two expression. I tried

(only({<[StartDate]={"<=$(vStartDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vStartDate)"}>}[bkgno])) +

(only({<[StartDate]={"<=$(vEndDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vEndDate)"}>}[bkgno]))

but it is not working, I am not getting results as expected.

Records with StartDate > vStartDate and those with EndDate < vEndDate is not getting displayed after using the union operator. 

How to go forward for getting union of the above two separate results ?

Tags (3)
1 Reply

Re: set analysis - union


If you mean you want to see those values that match both set modifiers, I'd try the following

(only({<[StartDate] = {"<=$(vStartDate)"} >} [bkgno]) * only({< [EndDate] = {">=$(vStartDate)"} >} [bkgno])) &

(only({<[StartDate] = {"<=$(vEndDate)"} >} [bkgno]) * only({< [EndDate] = {">=$(vEndDate)"} >} [bkgno]))

Using the "&" instead of the "+" to concatenate. Anyway it would be very helpful if you upload some sample data to see what you want to get.

Hope that helps

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Community Browser