Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

the max method in set analysis

Hi all members

i have one problem

i use like this exemple

Task

DateTask

T1

13/12/2015

T1

01/12/2015

T1

03/10/2014

T2

01/01/2016

T2

03/01/2016

T3

06/01/2016

i want to load the max date for any Task like

Task

DateTask

T1

13/12/2015

T2

03/01/2016

T3

06/01/2016

i used a variable vMaxDate=date(max(DateTask)) ( i wrote =  )

but the result is not OK, when i select one row in chart table i get the good value ,but in the first display for all values it desplay one values of all rows

Tache

Date

T1

13/01/2016

T2

13/01/2016

T3

13/01/2016

how can i do

thanks all

10 Replies
Not applicable

Re: the max method in set analysis

i used like this script

load 

Distinct Task,

(MakeDate(1900+left(DateTask,3))+mid(DateTask,4)-1) as DateTask ;

SQL SELECT

Tache as Task,

date as DateTask,

FROM "database".

MVP
MVP

Re: the max method in set analysis

Try

Task as Dimension

Expression

FirstSortedValue(DateTask, -Aggr(Max(DateTask),Task))

Not applicable

Re: the max method in set analysis

Does not work

MVP
MVP

Re: the max method in set analysis

Provide sample app

MVP
MVP

Re: the max method in set analysis

Create a Straight Table

Dimension

Task

Expression

Date(Max(DateTask))

nilesh_gangurde
Valued Contributor

Re: the max method in set analysis

Hi

Use this

load

Distinct Task,

(MakeDate(1900+left(DateTask,3))+mid(DateTask,4)-1) as DateTask ;

SQL SELECT

Tache as Task,

Max(date) as DateTask,

FROM "database" Group By Tache;

OR

In the Straight table take dimension as Task and expression as Aggr(Max(DateTask),Task)

Regards,

Nilesh

miguelbraga
Valued Contributor III

Re: the max method in set analysis

Hi there,

Check my solution.

Screenshot_1.png

Regards,

MB

senpradip007
Valued Contributor III

Re: the max method in set analysis

Look at this.

Re: the max method in set analysis

Seems to be working, what isn't working for you?

Capture.PNG

Community Browser