Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a column which contains numerical values. I want to sum up every 15 values.
So lets say i have 60 values in my column and I want to have 4 sums as a result:
sum1 = sum(value1,..., value15)
sum2 = sum(value16, ..., value30)
sum3 = sum(value31, ..., value45)
sum4 = sum(value46, ..., value60)
How do I achieve that?
Greetings
All 60 values present in single column? What is the rule to select 15 values?
Yes all 60 values are present in a single column.
Can you explain what you mean by "rule to select 15 values"?
I need the sums of every 15 values for my calculations.
How do you pick 15 values(value1,..value15) in sum1?
Can you explain "Every 15 values" with an example?
My Data looks like this:
Time [minutes] | Power [kW] |
---|---|
1 | 532 |
2 | 3525 |
3 | 321 |
4 | 54 |
5 | 87 |
6 | 874 |
7 | 6 |
8 | 387 |
... | ... |
I need to calculate the average value of Energy for every 15 minutes.
So if I have data from 480 minutes, I need to calculate 32 average values:
Average value of Energy for minute 1 - 14, 15-29, 16-44, ...
In QV Chart, we can accumulate values by 15 steps back, but this won't satisfy your requirement as you need sum2 as sum(16-30 columns).
My Thought is give a recno before loading rows of that table and create a new dimension based floor(recno()/15). So that we can sum in QV.
Dim: =SubField(Class(Time,14),' <= x < ',2)
Expr: Avg(Power)
Could an intervalMatch do this for you? IntervalMatch
dimension div(Time, 15) or dual(div(Time,15)*15 & '..' & (div(Time,15)*15+14) , div(Time,15))
expression avg(Power)
Hi,
thank you for your answer. That was the solution.