Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
The following table
Daily | project | val |
07.31.13 | a | 300.00 |
08.01.13 | a | 2.00 |
08.02.13 | a | 1.00 |
08.03.13 | a | 0.50 |
08.04.13 | b | 0.20 |
08.05.13 | b | 0.10 |
08.06.13 | a | 0.15 |
08.13.13 14:00 | a | 2.00 |
08.13.13 15:00 | a | 1.00 |
08.13.13 16:00 | a | 2.00 |
08.13.13 17:00 | a | 3.00 |
08.13.13 18:00 | a | 1.00 |
08.13.13 19:00 | a | 1.00 |
08.13.13 20:00 | a | 1.00 |
08.13.13 21:00 | a | 0.00 |
08.13.13 22:00 | a | 0.00 |
08.13.13 23:00 | a | 2.00 |
08.14.13 00:00 | a | 0.00 |
08.14.13 01:00 | a | 6.00 |
08.14.13 02:00 | a | 4.00 |
08.14.13 03:00 | a | 0.00 |
08.14.13 04:00 | a | 0.00 |
08.14.13 05:00 | b | 0.00 |
08.14.13 06:00 | b | 0.00 |
08.14.13 07:00 | b | 0.00 |
08.14.13 08:00 | b | 0.00 |
08.14.13 09:00 | b | 2.00 |
08.14.13 10:00 | b | 1.00 |
08.14.13 11:00 | b | 10.00 |
08.14.13 12:00 | b | 0.00 |
08.14.13 13:00 | b | 0.00 |
08.14.13 14:00 | b | 4.00 |
08.14.13 15:00 | b | 0.00 |
08.14.13 16:00 | b | 0.00 |
08.14.13 17:00 | b | 4.00 |
08.14.13 18:00 | b | 4.00 |
08.14.13 19:00 | b | 0.00 |
08.14.13 20:00 | b | 2.00 |
08.14.13 21:00 | b | 2.00 |
08.14.13 22:00 | b | 1.00 |
First I need to sum up all values to a daily level (in other words group by the values to daily so I wont have hourly vals)
Then I need to do an avg on those daily values for the last 14 days
This is what I came up with :
avg(aggr(sum(Aggr($(val), date,,project)), date, project))
val= (sum({<date ={"<41499>41485"}>}val)) - this var is a set analysis that calculates the last 14days , this work great my problem is with the grouping
Sadly i have to do this in the GUI can't use the script
Help please
I think you have too many commas in the first aggr. Delete one.
Try:
avg(
aggr(
sum(
Aggr(
$(val)
, date,project)
)
, date, project)
)
Where are you getting the date field from?
Are you reformating Daily as date in your script?
If so, what way have you formatted this date?
Hi,
If val= (sum({<date ={"<41499>41485"}>}val)) fails at grouping then add AGGR inside set analysis like
val= sum({<date ={"<41499>41485"}>}AGGR(sum({<date ={"<41499>41485"}>}val),date,project))
Hope it will suffix ur need.