Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
katchow002
Contributor III
Contributor III

How to get maximum and minimum timestamp?

Hey guys! I have a Start Date and End Date which has Start time and End time respectively. My task is to get the minimum and maximum timestamp for each outage, excluding Duration Type and Major Event Day (MED).

Here's how my data set looks like:

1.PNG

I tried min(timestamp#([Start Date],[Start Time],[Outage ID])) and max(timestamp#([Start Date],[Start Time],[Outage ID])) to no avail. I am a QlikView newbie so I'm sorry if I missed something obvious and thanks for your response in advance.

16 Replies
MK_QSL
MVP
MVP

Search for FirstSortedValue function

gerry_hdm
Creator II
Creator II

Firstsortedvalue

lastsortedvalue

by Group statement

katchow002
Contributor III
Contributor III
Author

Sir, do I write this in the Load Script or in the Expression tab?

gerry_hdm
Creator II
Creator II

by load script

gerry_hdm
Creator II
Creator II

MYTimestamp:

load OutageID,

firstsortedvalue(Timestamp) as FirstTimestamp,

firstsortedvalue(Timestamp) as FirstTimestamp

resident yourtable

group by OutageID

;

gerry_hdm
Creator II
Creator II

Greetings Gerold

olivierrobin
Specialist III
Specialist III

hello

for me , lastsortedvalue doesn't exist (that would be a good idea)

so i think you mean

MYTimestamp:

load OutageID,

firstsortedvalue(Timestamp,Timestamp) as FirstTimestamp,

firstsortedvalue(Timestamp,-Timestemp) as LastTimestamp

resident yourtable

group by OutageID

;

gerry_hdm
Creator II
Creator II

you can create a test.qvw ?

sunny_talwar

Would you be able to provide the Excel file above and also provide the expected output?