Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nuwanhwb87
Contributor III
Contributor III

aggregate data to 5min time

Hi,

I have below set of data and need to aggregate the data to 5-minute values where the minimum value for every 5th minute is used.

In different time slots current is measured 

nuwanhwb87_0-1654048762372.png

 

Any method. Please help
Thanks.

 

Labels (3)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

create a new field in your data that rounds timestamp to nearest 5th minute

example

timestamp(round(timestamp#('2022-06-01 11:27:30 000000','YYYY-MM-DD h:mm:ss ffffff'),5*60/86400))

will return  '2022-06-01 11:30:00 000000'

 

create a new field as below

timestamp(round(timestamp#(TIMESTAMPFIELDNAME,'YYYY-MM-DD h:mm:ss ffffff'),5*60/86400)) as roundedTimestamp

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
vinieme12
Champion III
Champion III

create a new field in your data that rounds timestamp to nearest 5th minute

example

timestamp(round(timestamp#('2022-06-01 11:27:30 000000','YYYY-MM-DD h:mm:ss ffffff'),5*60/86400))

will return  '2022-06-01 11:30:00 000000'

 

create a new field as below

timestamp(round(timestamp#(TIMESTAMPFIELDNAME,'YYYY-MM-DD h:mm:ss ffffff'),5*60/86400)) as roundedTimestamp

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.