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: 
Not applicable

Max of two sets

If I want to find the maximum value of a column from two states aggregated by a member's ID, should this work?

 

=Aggr(

    MaxString(

        Aggr(NODISTINCT MinString({[State1}DATE_STRING),MBR_ID) + Aggr(NODISTINCT MinString({[State2}DATE_STRING),MBR_ID)
    )

, MBR_ID)

So if I had this data:

MBR ID          DATE_STRING

1                     20120101

1                     20120102

1                     20120103

And State1 had 20120101 selected and State2 has 20120103 selected, my expression would return 20120103 for member 1.

Thanks!

0 Replies