Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
derekledbetter
Contributor III
Contributor III

how to get max(date) - then get user (number) - display name. Sometimes works

Good Afternoon from the East Coast USA,

While this is almost complete, I am still missing "USER" which should not be the case as everyone should match.  Here's the goal.

In this chart, using the data (table shown), Count (session) - works, get last user time (works), get the user associated with that row (doesn't ).  (See below)

Any assistance is appreciated in advance.

Thanks,

Derek

1 Solution

Accepted Solutions
sunny_talwar

Have you tried this

FirstSortedValue(DisplayNM, -EndDTSCombo)

View solution in original post

11 Replies
lironbaram
Partner
Partner

hi

probably you have more than one user that was active in the max date

so only function returns null , try switching the only function to concat and see the results

derekledbetter
Contributor III
Contributor III
Author

Hi,

Thanks for the reply.

Since I'm a newbie at QLIK, how should it be written?

derekledbetter
Contributor III
Contributor III
Author

I switched it and received many "names".  I only want the one that goes with the "last session" - Max(Date).

How do I?

lironbaram
Partner
Partner

if you got many names it's means there are many users which had a session in the last date

if you have a time stamp field than you could find the last session

derekledbetter
Contributor III
Contributor III
Author

EndDTSCombo - is a Timestamp column.  (that is what I'm using for "last session" (above)

--tried

only(If(EndDTSCombo = Max(TOTAL EndDTSCombo),  DisplayNM))

didn't work.  So far - closest is

only(If(Date = Max(TOTAL Date),  DisplayNM))

--if I could use "timestamp with the above - think that will do it.

sunny_talwar

Have you tried this

FirstSortedValue(DisplayNM, -EndDTSCombo)

View solution in original post

derekledbetter
Contributor III
Contributor III
Author

Hi,

Thanks for the "try this".

It did give me names - now , I just need to verify.

On other note, I did find the "first sorted value" - but it wasn't matching the MAX(DATE) - let me see if this worked.

Thanks,

Derek

derekledbetter
Contributor III
Contributor III
Author

I really appreciate you suggesting and assisting me with the "firstsortedvalue".     It appears to match 2 of my rows.  Now, for final validation.

Have a good weekend.

vinieme12
Champion II
Champion II

or below for multiple values on same timestamp


=FirstSortedValue(Aggr(concat(distinct DisplayNM,';'),EndDTSCombo), -AGGR(EndDTSCombo,EndDTSCombo))