Average not Working

Hi everyone, i'm having troubles on calculating the average 

the table contains a number value let call it "Total", and the date it's entered

i would like to get on a virtual colum the average based on the month it's entered

i'm using this formula:
AVERAGE(
 SELECT(GUILDWAR[TOTAL],
  AND([DATE] > EOMONTH([DATE], -1) , [DATE] <= EOMONTH([DATE], 0) )))

and this is the data i'm referring to:

DATEFIRSTSECONDTOTALNOTEMONTHLY AVG
31/05/20221 1Normal3,69
01/06/2022336Normal4,33
02/06/2022336Normal4,33
03/06/2022336Normal4,33
04/06/2022303Normal4,33
05/06/2022336Normal4,33
06/06/2022314Normal4,33
07/06/20221 1Normal4,33
08/06/2022314Normal4,33
09/06/2022213NormalHERE 

on 09/06 entry it returns 3,3 but it should return 4,33

can someone explain me where i'm wrong?

Solved Solved
0 2 68
1 ACCEPTED SOLUTION

Your usage of [Date] is ambiguous. The system doesn't understand that one instance is intended to look at the current record, and the other instance to look at the searched record. You need to use [_THISROW] to differentiate them.

https://help.appsheet.com/en/articles/2357314-select

 

 

View solution in original post

2 REPLIES 2

Your usage of [Date] is ambiguous. The system doesn't understand that one instance is intended to look at the current record, and the other instance to look at the searched record. You need to use [_THISROW] to differentiate them.

https://help.appsheet.com/en/articles/2357314-select

 

 

thanks, looks like it's working!
the only issue is that it gives out the average based only on previous entries not counting the one being inserted 
fine enough for my use, i'm just writing this down hoping it could help somebody else too !

Top Labels in this Space