Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated Dimension: How to retrieve the most recent date

Hi,

I am trying to create a pivot table that includes a "Completed On" date column.

data1.PNG.png

In my data set, i have many "Completed On" dates to one "SID" (Unique identifier).

data2.PNG.png

How do i create a calculated dimension that gets the most recent date from the "Completed On" column? Currently, SID 114381 is retrieving 14/10/2014, but i want it to retrieve 17/10/2014. How is this possible?

Thanks,

Matt

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this as Calculated Dimension

=Aggr(Max([Completed On]), SID)

Regards,

Jagan.

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

=FirstSortedValue([Completed On], -[Completed On])

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this as Calculated Dimension

=Aggr(Max([Completed On]), SID)

Regards,

Jagan.

Not applicable
Author

Hi Jonathan,

Thanks for the quick reply.

Getting an error.

If i put your formula into the expression of a table box , it comes up with these numbers, i'm not sure what they mean, maybe you can shed some light on it.

Thanks,

Matt

jagan
Luminary Alumni
Luminary Alumni

Hi Matt,

Convert the format to Date like below calculated dimension

Date(FirstSortedValue([Completed On], -[Completed On]))


Regards,

Jagan.