Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
aniket_2701
Contributor
Contributor

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

aniket_2701
Contributor
Contributor
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

aniket_2701
Contributor
Contributor
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

aniket_2701
Contributor
Contributor
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;

aniket_2701
Contributor
Contributor
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