How to calculate the averages of the last 4 hours of the variable FIC02 in the date of the cell DATE?
See below:
| DATE | FIC02 | |
|---|---|---|
| 08-jan-08 06:30:00 | ? | |
| 08-jan-08 13:30:00 | ? | |
| 08-jan-08 20:30:00 | ? |
I'm using PI DataLink's 'Calculated data' function in Excel with:
start time: 08-jan-08 06:30:00 - (4/24)
end time 08-jan-08 06:30:00
The code used is below:
=PIAdvCalcVal("FIC02";"'Planilha1'!$A$6 - (4/24)";Planilha1!$A$6;"average";"time-weighted";0;1;0;"")
The following error message appears: The time is invalid.


