Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need Help In set Analysis for MAx Value

Hello!  I need help in my set analysis in my pivot table  to get the max value...get the  latest award Award Value  based on Max date by FY, FQ and Company even if the Qty is 0

Here is my sample data

   

DateCompanyFYFQAwardQty
10/26/2014A2015Q11515
10/27/2014A2015Q115200
10/28/2014A2015Q130300
10/29/2014A2015Q130400
10/30/2014A2015Q1300
10/26/2014B2015Q120400
10/27/2014B2015Q115500
10/28/2014B2015Q120600
10/29/2014B2015Q145200
10/30/2014B2015Q12020
1/25/2014A2015Q21550
1/26/2014A2015Q230100
1/27/2014A2015Q22030
1/28/2014A2015Q23020
1/29/2014A2015Q2800
1/30/2014B2015Q215400
1/31/2014B2015Q230500
2/1/2014B2015Q220600
1/25/2014B2015Q220200
1/26/2014B2015Q21020

I tries using the formula  but doesn't work...When I select  FY2015 Q4, only the row with more than  0 qty will show up...I want all awards to show up even if  its 0 qty...

=only({<FY=,FQ=,Company=,Qty=,Date={"$(=MaxString(Date))"}>}Award)

   

  This is my desired results :

   

DateCompanyFYFQAward
10/30/2014A2015Q130
10/30/2014B2015Q120
1/29/2014A2015Q280
1/26/2014B2015Q210

I hope you can help me on this ...

Tks.

12 Replies
Anonymous
Not applicable
Author

I really want to show the Award for the ) qty...But it's ok...this is better.

Thank you for your time.

sunny_talwar

No problem

I am glad I was able to help.

Best,

Sunny

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this script

Table:

LOAD AutoNumber(Company & FY & FQ) AS Key,

  Date(Date) AS Date,

     Company,

     FY,

     FQ,

     Award,

     Qty

FROM

[https://community.qlik.com/thread/170074]

(html, codepage is 1252, embedded labels, table is @1);

LatestAward:

LOAD

     Key,

     Date(Max(Date)) AS Date,

     1 AS LatestAward

RESIDENT Table

GROUP By Key;

Now in chart :

Dimensions: Date, Company, FQ, FY

Expression: =Only({<LatestAward={1}>} Award)

Hope this helps you.

Regards,

jagan.