Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Value for the max date

Hi all, I have the following data set:

Name   Date   Value

Vika 20.09.2010 1

Vika 13.01.2009 0,5

Dan 01.01.2008 2

Dan 02.04.2009 1

Dan 06.02.2001 0,5

Kat 12.09.2011 2

Kat 11.08.2011 1


The results I want is:

Name Value

Vika 1

Dan 1

Kat 2


In other words I want to get Value for the max date.

Help me, please.

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Here is an example

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Here is an example

MK_QSL
MVP
MVP

=FirstSortedValue(Value,-Date)

preminqlik
Specialist II
Specialist II

This can be done in two ways in script level and in frontend

//**********************IN SCRIPT LEVEL

Load

Name,

firstsortedvalue(Date,-Date)               as               Date,

firstsortedvalue(Value,-Date)               as               Value

group by Name;

Load *

from

XXX;

>>> In the above method use expression as sum(Value)

//********************************IN FRONT END

sum(aggr(firstsortedvalue(Value,-Date),Name))

Not applicable
Author

You can Try This:

Take a staraight Table and add Name, Date as Dimensions.

Add an expression = Rank(Date), and Label it as RankDate Hide this expression by checking the "hide column" from presentation tab.

Add another expression was If(RankDate=1,Value,0).

Go to presentation tab and check the checkbox "Supress zero Values".

Hope this helps. It works in my case.

qv_jagan
Partner - Creator
Partner - Creator

Hi

Use this expression in the chart.

"=FirstSortedValue(Value,Date#(Date,'DD.MM.YYYY'),2)"

This will work.