Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

set analysis

Hi ,

my data looks like this

date                    price

1/02/2010              100

5/10/2010               500

6/01/2011               50

7/09/2011               300

8/02/2012              400

7/05/2012              600

Now i want output as

Maxdate             Latestprice

7/05/2012             600

because among all dates 7/05/2012 is the maximum date and 600 is the corresponding price.

But if select any year (eg:2010)

output must be

Maxdate             Latestprice

5/10/2010              500

. the latest price must show me the coresponding value of date(maxdate).

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: set analysis

Hi Avi,

     You have to use Set Analysis to get the Price for the Max(Date) in your selection. For example, like this:

     Max({<Date={'$(=Max(Date))'}>} Price)

I have attached a document with an example.

Juan Gerardo

4 Replies
Not applicable

Re: set analysis

Hi Avi,

     You have to use Set Analysis to get the Price for the Max(Date) in your selection. For example, like this:

     Max({<Date={'$(=Max(Date))'}>} Price)

I have attached a document with an example.

Juan Gerardo

Not applicable

Re: set analysis

Hi Avinash,

  Please Find the Attached File. Hope this helpful for you

Regards,

Nirmal.

Not applicable

Re: set analysis

Hi Avi,

Above Mentioned both answers are working fine

regards,

Ananth

Not applicable

Re: set analysis

HI

FOR THIS OUTPUT--

maxDatepricenew
7/5/2012600

WRITE CODE-

LOAD

date(max(date))as maxDate,

FirstSortedValue(price,-date)as pricenew;

LOAD date,

     price

FROM

(ooxml, embedded labels, table is Sheet1);

**************************************************************

FOR THIS OUTPUT, WRITECODE--

Community Browser