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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
spetushi
Creator
Creator

Set Analysis with AND, OR, and Ignore Fields Criteria

Hello All,

I am interested in finding the appropriate set analysis syntax to do the following:

(Field1 = 'stringA' OR Field2 = 'stringA')  AND Field3 = 'stringC' AND DateField >= StartDate AND DateField <= EndDate, ignore selection in fields: Field4, Field5, Field6


Thanks,

Sokol

3 Replies
vishsaggi
Champion III
Champion III

What is the Aggr function you are using I mean sum or count? So try like below

and make sure your startdate and endate are in same format as your DateField. Else use Date() function around start and end dates with formatting.

= Sum({<Field1 = {'stringA'}, Field2 = {'stringB'}>*<Field3 = {'stringC'}>*< DateField = {">=$(=Date(StartDate))<=$(=Date(EndDate))"} >} YourMeasurefield)

rubenmarin

Hi, maybe:

{<Field1={'stringA'},Field3={'StringC'},DateField={">=$(=Date(StartDate))<=$(=Date(EndDate))"}>,Field4,Field5,Field6>

+<Field2={'stringA'},Field3={'StringC'},DateField={">=$(=Date(StartDate))<=$(=Date(EndDate))"}>,Field4,Field5,Field6>}


or maybe:

{<Field1={'stringA'}>+<Field2={'stringA'}>*<,Field3={'StringC'},DateField={">=$(=Date(StartDate))<=$(=Date(EndDate))"}>,Field4,Field5,Field6>}

spetushi
Creator
Creator
Author

The Aggr function it's a Count