Skip to main content
1-Visitor
Solved

Infotable Aggregate data for specific timeframe as hourly or daily

Hello there,

I have a time series like this:

PD_9592550_0-1611591861070.png

This is the result of a QueryPropertyHistory call for Test property of a thing.

 

Is there any way to group by a specifying time frame such like hourly or daily and ask to have the AVG value of "Test" column ?

I saw that in the Aggregate function you can specify the column for which aggregate data, but you can't make any operation on the data contained in that column, such like truncate the datetime value to have an hourly or daily based aggregation.

 

Thanks,

Paolo

PaiChungAnswer
22-Sapphire I

You are correct, I would first add the grouping column you need then you can aggregate and add that grouping with the aggregate function.

6 replies

PaiChung22-Sapphire IAnswer
22-Sapphire I

You are correct, I would first add the grouping column you need then you can aggregate and add that grouping with the aggregate function.

Translate
PaoloDR1-VisitorAuthor
1-Visitor

So the only way I have to achieve the result is to literate all the InfoTable adding the column and the expected value for each row?

Translate
22-Sapphire I

I would run a DeriveFields to add the column(s) you need for grouping and then run the Aggregate

Translate
Support

Hi @PaoloDR.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others in the community.

 

Regards.

 

--Sharon

Translate