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

Get max date using wildcard and set analysis?

I am having several problems with a chart function I am trying to write. I need to get the max date when several conditions are true. It is a simple query to run in SQL and looks like this:

SELECT Name,

               COUNT(*),

               MAX(Date)

   FROM Table

WHERE (ConditionA LIKE '%qualifier%' OR Condition B LIKE '%qualifier%')

      AND ConditionC = 'False'

GROUP BY Name

This query counts the number of instances where the conditions are true and finds the most recent occurrence where they were all true.

In Qlik Sense, it seems like the best way to go about this would be through set analysis, but I can't get the syntax to work.

I am unable to get wildcards or wildmatch to work in set analysis and have no idea how to use set analysis to get a max(date) calculation.

I am not married to set analysis if an if statement or other solution would work better.

1 Solution

Accepted Solutions
sunny_talwar

May be this

Max({<ConditionA = {"*qualifier*"}, ConditionC = {'False'}>+<ConditionB = {"*qualifier*"}, ConditionC = {'False'}>}Date)

View solution in original post

2 Replies
sunny_talwar

May be this

Max({<ConditionA = {"*qualifier*"}, ConditionC = {'False'}>+<ConditionB = {"*qualifier*"}, ConditionC = {'False'}>}Date)

Anonymous
Not applicable
Author

Thanks Sunny, you are a wizard!