Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to calculate an average within a set expression? I would like to calculate the average number of active employees for the current selection.
I am calculating the active EE by =num(COUNT({<PeriodType={'Current'},isActiveEmp_flg={1}>}DISTINCT Employee_Number),'#,##0')
After updating my expression to include Avg, I do not return any results. Is this due to aggregate and non aggregate?
If i understand correctly, You can define as
num(Avg(Aggr(COUNT({<PeriodType={'Current'},isActiveEmp_flg={1}>}DISTINCT Employee_Number),AsOfPeriod)),'#,##0')
How are u calculating the AVG?
u can't use 2 agg functions at the same time ; to use the avg, ur expression should be as follow:
avg(aggr(count(measure),dimension))
If i understand correctly, You can define as
num(Avg(Aggr(COUNT({<PeriodType={'Current'},isActiveEmp_flg={1}>}DISTINCT Employee_Number),AsOfPeriod)),'#,##0')
Thanks for the quick reply!
I was calculating the average by:
avg(num(COUNT({<PeriodType={'Current'},isActiveEmp_flg={1}>}DISTINCT Employee_Number),'#,##0'))