Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with several fields that include:
A unique ID
An "Event" ID
A "Time" column with a numeric value for days
-several others
I would like to flag, for each "event" ID, the occurrence with the largest value for "Time"
I'm trying the solution suggested by this post but I've had some issues. At first I couldn't get the MAX() function to work within qlik so I did it through SQL. Now this part works but when I do the join to add the flags, it is added to every line.
Any suggestions to fix this solution or maybe an idea for a different one?
Thank you,
May be try like this
Table:
LOAD ID,
Event_ID,
Time,
...
From ...;
Left Join (Table)
LOAD ID,
Max(Time) as Time,
1 as Max_Event
Resident Table
Group By ID;