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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to find max value?

Hi Folks,

How to find the max value based on receipt date...

I want to show only max receiptdate of max unit price

aaa.JPG

Regards,

Sub2u444

30 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

did you tried this

Data:

LOAD

*

FROM DataSource;

LEFT JOIN(Data)

LOAD

     PartNo,

     max(Unit Price) as Unit Price,

     1 AS MaxPriceFlag

RESIDENT Data

GROUP BY PartNo;

Now in front end use below expression for getting max date of the Part No.

Max({<MaxPriceFlag={1}>}ReceiptDate)

Hope this helps you.

Regards,

Jagan.

Digvijay_Singh

like this, PartNo as Dimension

Capture.JPG

Not applicable
Author

Hi,

can you share the script and expressions ..

Sub2u444

Digvijay_Singh

Script is having just the loaded data you shared, expressions are shown in the image header -

Load * inline [

PartNo,RDate,UP

1,13-01-2016,30

1,20-02-2016,10

1,15-03-2016,40

2,10-02-2016,10

2,25-03-2016,40

2,15-05-2016,80

10,25-03-2015,40

10,22-04-2015,100

10,10-06-2015,200

10,01-08-2015,90 ];

Not applicable
Author

Hi,

Thanks, but i have not getting the 1 value data..

Sub2u444

Not applicable
Author

Hi,

its now working..

Sub2u444

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check thsi

Data:

Load

PartNo,

Date(Date#(RDate, 'DD-MM-YYYY'), 'DD-MM-YYYY') AS RDate,UP

inline [

PartNo,RDate,UP

1,13-01-2016,30

1,20-02-2016,10

1,15-03-2016,40

2,10-02-2016,10

2,25-03-2016,40

2,15-05-2016,80

10,25-03-2015,40

10,22-04-2015,100

10,10-06-2015,200

10,01-08-2015,90 ];

LEFT JOIN(Data)

LOAD

PartNo,

Max(UP) AS UP,

1 AS MaxPriceFlag

RESIDENT Data

GROUP BY PartNo;

Next time don't attach screenshot of your data attach the sample data and let us know your required result.  This way it is easier to try and provide you the solution.

Regards,
Jagan.

Not applicable
Author

Hi Amarnath,

not getting the data..

@Sub2u444

jagan
Partner - Champion III
Partner - Champion III

Hi

If you got the answer close this thread by giving Correct & Helpful answers to the posts which helps you.

Regards,

Jagan.

Not applicable
Author

Hi,

Thanks for the reply. i got the max date field now.

** i want to show the value of that max date.

EX:- 1 -> 15/03/2016 -> 2 value id's (20,40)

I need to show only 40 value.

Sub2u444