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: 
apthansh
Creator
Creator

OR in set analysis

How to put OR between 2 dates in the below set analysis ?

(Count({<

          [Activity Status] ={'Active'},

                [ Plan] = {"$(='>' & Date(Today()))"} or [Revised] = {"$(='>' & Date(Today()))"}

   >} [ID]) )


If I do as below few ID's will get counted twice...


(Count({<

          [Activity Status] ={'Active'},

                [ Plan] = {"$(='>' & Date(Today()))"}

   >} [ID]) ) 


+


(Count({<

          [Activity Status] ={'Active'},

               [Revised] = {"$(='>' & Date(Today()))"}

   >} [ID]) )


Thanks Much

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

May be like this:

Count({<[Activity Status] ={'Active'}, [ Plan] = {"$(='>' & Date(Today()))"}>+<[Activity Status] ={'Active'}, [Revised] = {"$(='>' & Date(Today()))"}>} [ID])

Read about the the set analysis operators here:

Implicit Set Operators

sergio0592
Specialist III
Specialist III

Try this (Sunny has helped me on a similar problem last week)

(Count({<  [Activity Status] ={'Active'}, [ Plan] = {"$(='>' & Date(Today()))"}> + <[Activity Status] ={'Active'}, [Revised] = {"$(='>' & Date(Today()))"}  >} distinct [ID]) )