Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
mrichman
Creator II
Creator II

How to show latest status of maximum date as expression?

Hi Community,

I was wondering how you guys would approach the following, in a straight table + expression?

I have a straight table with ClientID, Date, Status and I would only like to see Clients with the maximum date and current status. However, im getting the other data too. This would make it difficult for me to export to excel.

Current:

Astrida 2018-05-25 1

Astrida 2018-05-26 2

Astrida 2018-05-30 3

Betacab 2018-05-25 1

Betacab 2018-05-27 3

Betacab 2018-05-30 2

Canutility 2018-05-24 2

Canutility 2018-05-25 1

Canutility 2018-05-29 3

Ideal Solution:

Astrida 2018-05-30 3

Betacab 2018-05-30 2

Canutility 2018-29 3

Data:

LOAD * inline [

Customer|Date|Status

Astrida|2018-05-25|1

Astrida|2018-05-26|2

Astrida|2018-05-30|3

Betacab|2018-05-25|1

Betacab|2018-05-27|3

Betacab|2018-05-30|2

Canutility|2018-05-24|2

Canutility|2018-05-25|1

Canutility|2018-05-29|3

] (delimiter is '|');

Thanks in advance!!

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

try this if you want to keep your dimensions on the table:

=if(Date=Max(TOTAL <Customer>  Date),only(Status))

View solution in original post

5 Replies
tresesco
MVP
MVP

Dimension: Customer

Exp1: Max(Date)

Exp2: FirstSortedValue(Status, -Date)

YoussefBelloum
Champion
Champion

Hi,

try this if you want to keep your dimensions on the table:

=if(Date=Max(TOTAL <Customer>  Date),only(Status))

mrichman
Creator II
Creator II
Author

Thanks, it worked.

mrichman
Creator II
Creator II
Author

Thanks this worked better than the recommendation above. !

YoussefBelloum
Champion
Champion

you're welcome, good luck