Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jeckstein
Partner - Creator
Partner - Creator

Set Analysis within Set Analysis within SetAnalysis

I have the following equation

(sum({<[Date]={"$(=Max(Date))"}>}Sessions)

This is giving me the sum of Sessions where the date is the max date.

But the only dates that should qualify for max date is where sum(Sessions) on that day is greater then 0.

Meaning if I have the following table

DateSessions
1/1/20175
1/2/20173
1/3/20170

I want my result to be 3. This is the max date where sessions is greater then 0.

Thanks in advance,

4 Replies
sunny_talwar

May be this:

Sum({<[Date]={'$(=Max({<Date = {"=Sum(Sessions) > 0"}>}Date))'}>} Sessions)

jeckstein
Partner - Creator
Partner - Creator
Author

Sunny,

That did not seem to work

sunny_talwar

My bad, I just changed it... try this:

Sum({<[Date]={'$(=Max({<Date = {"=Sum(Sessions) > 0"}>}Date))'}>} Sessions)

Anonymous
Not applicable

is this also ok?

Sum({<[Date]={"=((Date=Max(Date)) and (Sum(Sessions)>0))"}>} Sessions)