Hello community
How do you use average(), i have been on appsheet doc, and did the
AVERAGE([Duration])
But getting the error “AVERAGE function is used incorrectly” each time, the format of duration is duration of cause but even when i do use number i get he some error. how do you use it?
The parameter for AVERAGE should be a list of items (Table[Column] instead of just [Column] unless the column itself is a list such as ENUMLIST or LIST) and i guess it should be numeric
So if i what my duration, i should first recreate a virtual column but in Number format, then the formula:
AVERAG(SELECT(Sheet of controls[Durations]))
Correct?
AVERAGE(SELECT(Sheet de controls[Nombre de rolls]))
am getting the error:
SELECT has invalid inputs
I think you cannot convert DURATION directly to NUMBER
Try adding a Virtual Column say [Duration1] with following Formula
(HOUR([DURATION])*1.0)+(MINUTE([DURATION])*1.0/60)
Then get Average of this VC using
AVERAGE(TableName[Duration1])
1 Like
Hi @jyothis_m ,
Good solution, Just as a side note, AppSheet has added 3 functions, namely, TOTALHOURS(), TOTALMINUTES() and TOTALSECONDS() to manage decimal treatment of duration.
TOTALHOURS() - AppSheet Help
So
(HOUR([DURATION])*1.0)+(MINUTE([DURATION])*1.0/60)
can be achieved by TOTALHOURS([Duration])
2 Likes
Thank you
@Suvrutt_Gurjar I was not aware of these expressions.
1 Like