Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
mvtriff
Contributor
Contributor

Load data: Min and max value by day in Data Load Editor

Hi everyone,

 

Could you please help me with the script below?

I need to import the measurements from the last 30 days (this is already done and it works) and for each datetime the min value and max value corresponding to that datetime.

What should I add to the script below?

Many thanks.

M.

 

[measurements]:
LOAD
[id] AS [measurements.id],
[deviceid],
[datetime] AS [measurements.datetime],
Date(floor([datetime]) , 'DD/MM/YYYY') as [measurements.date],
[value],
[measurementlistid];
SELECT id,
deviceid,
datetime,
`value`,
measurementlistid
FROM ebdb.measurements
WHERE datetime >= '$(v30DaysAgo)'

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

MinMax:
LOAD
  [measurements.datetime]
  Min(value) as MinValue,
  Max(value) as MaxValue
Resident measurements
Group by [measurements.datetime]
;

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com