Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date and Time maximum data

Hi all,

Data:   

Prod, Sales,Date

    A, 10, 10 Jan 15 4pm

    A, 10, 10 Jan 15 9pm

    B, 10, 10 Jan 15 8pm

    B, 10, 10 Jan 15 11pm

    C, 10, 10 Jan 15 9pm

    A, 10, 15 Jan 15 1pm

    A, 10, 15 Jan 15 3pm

    A, 10, 15 Jan 15 6pm

    B, 10, 15 Jan 15 9pm

    C, 10, 15 Jan 15 3pm

    C, 10, 15 Jan 15 9pm

    C, 10, 15 Jan 15 7pm

    A, 10, 21 Feb 15 7pm

    B, 10, 21 Feb 15 4pm

    B, 10, 21 Feb 15 6pm

    C, 10, 21 Feb 15 11am

    C, 10, 21 Feb 15 4pm

    C, 10, 21 Feb 15 9pm

    ,

];

Please show the output ,

specific product and specific date wise ,max order date

Output :

A : 10 JAN 15 9pm

A : 15 JAN 15 3pm

A : 21 Feb  15 2pm

B : 10 Jan  15 11pm

B : 15 Jan  15 9pm

B : 21 Feb 15 6pm

C :10 Jan 15 9pm

C : 15 Jan 15 9pm

C : 21 Feb 15 9pm

Thanks

13 Replies
MK_QSL
MVP
MVP

What is the logic.. Can you explain please?

I mean the logic to get below line.

A : 10 JAN 15 9pm

A : 15 JAN 15 3pm

A : 21 Feb  15 2pm

Anonymous
Not applicable
Author

Max time with max date(Compare with max time).

Ex: One day sales two time means (1 jan 2015 5pm & 1 jan 2015 9pm)

the max time is (1 jan 2015 9pm).

I want these answer.

MK_QSL
MVP
MVP

Use

Prod as dimension

Max(Date) as Expression

Anonymous
Not applicable
Author

Hello Manish,

In back end how to do?

MK_QSL
MVP
MVP

You want only Prod and MaxDateTime.. or you want sales as well.

If you want Sales of Prod then what is the logic for sales

Anonymous
Not applicable
Author

No required for sales.

Just want to see whether in one day max time .

that's all

MK_QSL
MVP
MVP

SET DateFormat='DD MMM YY';

SET TimestampFormat='DD MMM YY hhTT';

Data:

Load

  Prod,

  Sales,

  Date,

  Date(Floor(Date)) as OnlyDate

Inline

[

  Prod, Sales,Date

    A, 10, 10 Jan 15 4pm

    A, 10, 10 Jan 15 9pm

    B, 10, 10 Jan 15 8pm

    B, 10, 10 Jan 15 11pm

    C, 10, 10 Jan 15 9pm

    A, 10, 15 Jan 15 1pm

    A, 10, 15 Jan 15 3pm

    A, 10, 15 Jan 15 6pm

    B, 10, 15 Jan 15 9pm

    C, 10, 15 Jan 15 3pm

    C, 10, 15 Jan 15 9pm

    C, 10, 15 Jan 15 7pm

    A, 10, 21 Feb 15 7pm

    B, 10, 21 Feb 15 4pm

    B, 10, 21 Feb 15 6pm

    C, 10, 21 Feb 15 11am

    C, 10, 21 Feb 15 4pm

    C, 10, 21 Feb 15 9pm

];

Left Join(Data)

Load Prod, OnlyDate, TimeStamp(Max(Date)) as MaxDate Resident Data

Group By Prod, OnlyDate;

Anonymous
Not applicable
Author

I got wrong answer and , my question is easy.

Just need :

Max time with particular day.

Please show the output ,

specific product and specific date wise ,max order date

Output :

A : 10 JAN 15 9pm

A : 15 JAN 15 3pm

A : 21 Feb  15 2pm

B : 10 Jan  15 11pm

B : 15 Jan  15 9pm

B : 21 Feb 15 6pm

C :10 Jan 15 9pm

C : 15 Jan 15 9pm

C : 21 Feb 15 9pm

Thanks,

And i wrote your answer it give wrong answer.

MK_QSL
MVP
MVP

How below is possible?

We don't have 2pm for 21st Feb for Prod A

A : 21 Feb  15 2pm