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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinDallas
Specialist III
Specialist III

Incorporate AND in Set Analysis after ORs

Hello Folks,

I've currently got this set analysis which reads:

A or B or C or D

What I would like to say is something like this

( A or B or C or D) AND ( Y = Foo ).



How do I express the phrase AND ( Y = Foo )?


This is the monstrosity I've got, essentially once we've satisfied the date requirements, I need to add an "AND EmploymentType='Contractor'".  I could put this into each and everyone one of my date OR filters, but that seems sloppy and will make my statement even less readable.

COUNT(

{<[Employee Start Date]={"<=$(=Min(GenDate))"}, mpp_terminationdt={">=$(=Min(GenDate)) <=$(=Max(GenDate))"}>+

        <[Employee Start Date]={">=$(=Min(GenDate))"},  mpp_terminationdt={"<=$(=Max(GenDate))"}>+

            <[Employee Start Date]={">=$(=Min(GenDate)) <=$(=Max(GenDate))"}, mpp_terminationdt={">=$(=Max(GenDate))"}>+

                <[Employee Start Date]={"<=$(=Min(GenDate))"}, mpp_terminationdt={">=$(=Max(GenDate))"}>}

                  mpp_id

) 

Any help is greatly appreciated.

1 Solution

Accepted Solutions
agigliotti
MVP
MVP

you could add an If statement as below:

Count( {< set analysis >} if( EmploymentType = 'Contractor', mpp_id ) )

OR

try adding in Set Analysis as below:

Count( { < set analysis > * < EmploymentType = {'Contractor'} >} mpp_id )

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

View solution in original post

2 Replies
agigliotti
MVP
MVP

you could add an If statement as below:

Count( {< set analysis >} if( EmploymentType = 'Contractor', mpp_id ) )

OR

try adding in Set Analysis as below:

Count( { < set analysis > * < EmploymentType = {'Contractor'} >} mpp_id )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
JustinDallas
Specialist III
Specialist III
Author

Well, that was anti-climatic...