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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
agigliotti
MVP
MVP

Publisher Simple Reduce using "OR" operator

Hello,

I have to configure a publisher task with simple reduce using the following condition:

(FIELD1 IN ('01,'02','10','11') OR (FIELD1 = '30' AND FIELD2 = '01'))

How can I achieve it ?

Many thanks in advance.

Best Regards

Andrea

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Labels (1)
9 Replies
stabben23
Partner - Master
Partner - Master

Hi,

Why dont you put in a where statment?

//Staffan

agigliotti
MVP
MVP
Author

because I have several users with different where conditions to apply.

I'm thinking to create one task for each user.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
stabben23
Partner - Master
Partner - Master

Ok, can you create a bookmark with these selections? And then use simple reduce with bookmarks.

//Staffan

agigliotti
MVP
MVP
Author

Yes but how I can ?

I don't know how is possible using something like OR condition...

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
stabben23
Partner - Master
Partner - Master

Ok, But will it not give you the same result even if you select Field1=01,02,10,11 or Field1=30 and Field2=01?

agigliotti
MVP
MVP
Author

I'll try to be more clear...

Ex. FIELD1 = COMPANY

FIELD2 = COUNTRY

I need to select for the COMPANY = 01-02-10-11 all country while for the COMPANY= 30 only the country = 01

The results are of course different...but I need the UNION of both selections

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
stabben23
Partner - Master
Partner - Master

But if you reduce the field country with 01 you will only get 01 no matter what. You can not both reduce and keep.

//Staffan

agigliotti
MVP
MVP
Author

finally the only way is to create 2 tasks for that user, one using COMPANY = 01,02,10,11 that will create the document_1.qvw and the other task using COMPANY = 03 and COUNTRY = 01 that will create the document_2.qvw

Is this right ?

AG

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
stabben23
Partner - Master
Partner - Master

That seams to be the only way, in any case in my qv-world.

//Staffan