Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

OR AND operators in set analysis

Hi All,

help me in this set analysis:

I need to consider activities with start into an interval defined by two variable either activities with start before interval with end after interval

Only

(

  {$    <

                          TIME_BEGIN = {'>$(TimeBeginZ)<$(TimeEndZ)'}

                          OR

                          {

                          TIME_END    = {'>$(TimeEndZ)'}

                          AND

                          TIME_BEGIN = {'<$(TimeBeginZ)' }

                          }

           >

    }    

  TIME_END-TIME_BEGIN

)

How can I insert the second set?

Only

(

{$    <

            TIME_BEGIN = {'>$(TimeBeginZ)<$(TimeEndZ)'} 

         >

  }   + 

{$    <

            TIME_END     = {'>$(TimeEndZ)'},

            TIME_BEGIN = {'<$(TimeBeginZ)' }

         >

  }    

  TIME_END-TIME_BEGIN

)

Thanks in advance

Corrado

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Only

(

{$    <

            TIME_BEGIN = {'>$(TimeBeginZ)<$(TimeEndZ)'}

        >

    +

   <  TIME_END    = {'>$(TimeEndZ)'}>

            *

      <     TIME_BEGIN = {'<$(TimeBeginZ)' } >

    

  }

  TIME_END-TIME_BEGIN

)

Edit: Corrected the brackets.

View solution in original post

3 Replies
tresesco
MVP
MVP

Try like:

Only

(

{$    <

            TIME_BEGIN = {'>$(TimeBeginZ)<$(TimeEndZ)'}

        >

    +

   <  TIME_END    = {'>$(TimeEndZ)'}>

            *

      <     TIME_BEGIN = {'<$(TimeBeginZ)' } >

    

  }

  TIME_END-TIME_BEGIN

)

Edit: Corrected the brackets.

Not applicable
Author

Hi Corrado,

try this too

Only

(

{$    <

            TIME_BEGIN = {'>$(TimeBeginZ)<$(TimeEndZ)'}

        >

    +

   <  TIME_END    = {'>$(TimeEndZ)'}, TIME_BEGIN = {'<$(TimeBeginZ)' } >

   

  }

  TIME_END-TIME_BEGIN

)

Regards

Hilic

Not applicable
Author

Thanks all,

the answers are all correct.

Regards

Corrado