Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to return the latest status per Project based on date

Hi

I have a list of Projects with the status of each project at a certain point in time. What I would like to do is create a straight table that shows the latest status per project, ie something like:

LatestStatus.JPG

Thanks for you help

Sample data:

Load

*

INLINE [

    ProjectID, StatusDate, Status

    P1, 2012/01/01, Active

    P1, 2012/01/20, on Hold

    P1, 2012/02/15, Discontinued

    P2, 2012/01/05, Active

    P2, 2012/01/07, on Hold

    P3, 2012/01/02, Active

    P3, 2012/01/09, Discontinued

]
;

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use ProjectID as dimension and create two expressions:

aggr(firstsortedvalue(StatusDate, -StatusDate),ProjectID)

aggr(firstsortedvalue(Status, -StatusDate),ProjectID)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Use ProjectID as dimension and create two expressions:

aggr(firstsortedvalue(StatusDate, -StatusDate),ProjectID)

aggr(firstsortedvalue(Status, -StatusDate),ProjectID)


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks!