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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

First date after last date

Hi

Have 2 tables both with a date field (linked on Pat), trying to return the first date from one table after the last date in the other table. Below is what I have so far. Acting like the IF doesn't apply to each Pat - which kind of makes sense. There isn't something like AggrIf?

Thanks!


aggr(min(if(Date2 > aggr(max(Date1), Pat), Date2)), Pat)


1 Solution

Accepted Solutions
Not applicable
Author

Hi Scott,

I haven't surrendered by this challenge, so, I have a new solution for your problem using input fields, I don't know why qlikview does't allow the logical expression that you were made, but with the use of this objects I could calculate the max date of every pat then make the comparation like you need.

So, I hope again this works you.

Best regards.

View solution in original post

3 Replies
Not applicable
Author

Hi Scott,

I think the solution is using the qualifier Total inside the internal aggregation.

See my attached file.

I hope this help you.

Best regards.

Anonymous
Not applicable
Author

Hi Magv

Oh... Had high hopes!

But if you filter field1 to just A. You get different results for Patient 1/exp2 if you have all pats selected or just Patient 1 selected

Sorry for my delay - was on vacation

thanks!

Not applicable
Author

Hi Scott,

I haven't surrendered by this challenge, so, I have a new solution for your problem using input fields, I don't know why qlikview does't allow the logical expression that you were made, but with the use of this objects I could calculate the max date of every pat then make the comparation like you need.

So, I hope again this works you.

Best regards.