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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
dcd123456
Creator
Creator

set analisys max(date) filter

Hello

i have a table  with three fields like this

idcmy_stamp_datevaue
285029/03/2019 06:41:1920,37
285029/03/2019 06:41:2920,33
285029/03/2019 06:41:3920,31
284929/03/2019 06:43:2921,51
284929/03/2019 06:43:3921,53
284929/03/2019 06:43:4921,53
284929/03/2019 06:49:2921,64
276929/03/2019 06:41:2121,2
276929/03/2019 06:41:3021,05
276929/03/2019 06:41:4120,89

 

i need to show a straigh table with the idc field as dimension, to show the value field that correspond to the max of the field my_stamp_date for each idc value, for example with the abobe data i need to show the next result

   
idcmy_stamp_datevaue
285029/03/2019 06:41:1920,37
284929/03/2019 06:43:2921,51
276929/03/2019 06:41:2121,2

 

i have defined a strigh table with the field idc as dimension and the next expresion:

only({<my_stamp_date= {"$(=Max(my_stamp_date))"}>} value)

 

but don't work, it only show me the value that correspondt to the global max value of the field my_stamp_date it seem 

idcmy_stamp_datevaue
284929/03/2019 06:43:2921,51

 

it seem that translate the expresion to only({<my_stamp_date= {"29/03/2019 06:43:29"}>} value) and only  show me a record, no the value of the max my_stamp_date of each group of idc.

 

Thanks in advance for your help

best regards

diego

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Set analysis gets evaluated once per chart; and not row-wise. Try like:

Dim: idc

Exp1 (max date): timestamp(max(my_stamp_date))

Exp2 (max date value): firstsortedvalue( vaue, - my_stamp_date)

View solution in original post

3 Replies
tresesco
MVP
MVP

Set analysis gets evaluated once per chart; and not row-wise. Try like:

Dim: idc

Exp1 (max date): timestamp(max(my_stamp_date))

Exp2 (max date value): firstsortedvalue( vaue, - my_stamp_date)

amrinder
Creator
Creator

Handle it at script level using FirstSortedValue function.

-amrinder

VishalWaghole
Specialist II
Specialist II

Use this,

 

have look at attached document

Dim : idc
Calculated Dim : Timestamp(aggr(min(my_stamp_date),idc),'DD/MM/YYYY hh:mm:ss')
Expression for vaue : FirstSortedValue(vaue,-aggr(min(my_stamp_date),idc))

To achieve this make sure your date fields should display in Timestamp formate at qlik level.

Thank
Vishal Waghole