Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

aleix_rodriguez
New Contributor

How to show data in a simple table

Dear all,

I've got a table like this:

DateInitial_timeFinal_timeIndex
16/05/201418:49:0019:11:0030468
16/05/201419:11:0023:59:0032509
16/05/20140:00:001:40:0032655

I want a table that shows the following values:

- Initial time: The value wiht the lower Index

- Final time: The value with the highes index

The result should be the following table:

DateInitial TimeFinal Time
16/05/201418:49:001:40:00

Thank you for your help.

Best regards,

Aleix.

1 Solution

Accepted Solutions

Re: Re: How to show data in a simple table

may be like attached.

Regards

ASHFAQ

5 Replies

Re: How to show data in a simple table

Use Date and Index as dimension

in the expression write

Min(Initial_time)

Max(Final_time)

Let me know

MVP
MVP

Re: How to show data in a simple table

Create a straight table with dimension Date and two expressions:

=FirstSortedValue( Initial_time, Index)

=FirstSortedValue( Final_time, -Index)

senpradip007
Valued Contributor III

Re: How to show data in a simple table

PFA

Re: Re: How to show data in a simple table

may be like attached.

Regards

ASHFAQ

Re: How to show data in a simple table

In the load script load a table like

TimeTable:

LOAD Date#(Dat,'DD/MM/YYYY') as Dat, Time#(Initial_time,'hh:mm:ss') as Initial_time,Time#(Final_time,'hh:mm:ss') as Final_time, Index;

LOAD * Inline

[

Date, Initial_time, Final_time, Index

16/05/2014, 18:49:00, 19:11:00, 30468

16/05/2014, 19:11:00, 23:59:00, 32509

16/05/2014, 0:00:00, 1:40:00, 32655

];

Final:

LOAD

Date,

FirstSortedValue( Initial_time, Index) as Min_Initial_time,

FirstSortedValue( Final_time, -Index) as Max_Final_time

Resident TimeTable

Group By Date;

And take table box with

Dimension:-  Date, Min_Initial_time, Max_Final_time

Or in the Expression level you can do like

Dim:- Date

Expression:- FirstSortedValue( Initial_time, Index)

Expression:-  FirstSortedValue( Final_time, -Index)

Community Browser