Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
saumyashah90
Specialist
Specialist

i have a requirement for user and date

UserDateValue
U114/12/201411
U124/12/20143
U213/11/20144
U33/12/20143
U34/12/20142
U327/12/201411

I need out put with each users max date and its value

U1  24/12/2014   3

U2  13/11/2014    4

U3   27/12/2014   11

Thanks

1 Solution

Accepted Solutions
7 Replies
sunny_talwar

Where are you trying to show this? in a straight table or text box?

settu_periasamy
Master III
Master III

Hi,

Try this

Load User,Max(Date),Sum(Value) Resident YourTable Group by User;

eduardo_sommer
Partner - Specialist
Partner - Specialist

Use a straight table with User as dimension and two expressions

For the Date Column: firstsortedvalue(Date, -Date)

For the Value Columnd: firstsortedvalue(Value, -Date)

The -Date in the function is to reverse sorting

Eduardo

sunny_talwar

Capture.PNG

saumyashah90
Specialist
Specialist
Author

Hi sunny,

i got date corretly but not value.

Basically Value is already count of (Dates) which no. of times that user have used it on that day

so values= Count(Dates)

and when put FirstSortedValue(Count(Date),-Date)

it shows me error

saumyashah90
Specialist
Specialist
Author

i guess normal count(Date) will work

MayilVahanan

Hi

May be try like this

Load User, Date from yourtable;

Join

Load User, Date(Max(Date)) as maxDate Resident Table1 Group By User;

In Straight table

Use

User and maxDate as Dimension

Exp:

= Sum({<Date = {"=Date=maxDate"}>} 1)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.