how to use average function ?
how to use average function ?
I want to use Average funct. for only values > 0.
How to write the expression in Average funct ?
Or how to average only values > 0 ?
For ex. I Have following values: 30 - 20 - 0 - 15 - 0
in normal average I have (30+20+0+15+0) / 5. this is not correct !!
I want this average: (30+20+15) / 3
Many thanks for resp..
Enio Donci from Italy
How to write the expression in Average funct ?
Or how to average only values > 0 ?
For ex. I Have following values: 30 - 20 - 0 - 15 - 0
in normal average I have (30+20+0+15+0) / 5. this is not correct !!
I want this average: (30+20+15) / 3
Many thanks for resp..
Enio Donci from Italy
Re: how to use average function ?
Hello,
Please try to use the following expression:
Thank you.
Please try to use the following expression:
Code: Select all
{AvgIf(DataSourceName.ColumnName,DataSourceName.ColumnName != 0)}
Re: how to use average function ?
Hi Aleksey,
I am looking to get Average for 3 Financial statement years, my formula is not working, can you please help me to identify issue.
{AvgIf(Optimist.Legal_Entity.Model.Current_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Prior_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Prior_Prior_Yr.Commercial_and_Industrial___EBIT___Value !=0)/1000}
Thanks
Pat
I am looking to get Average for 3 Financial statement years, my formula is not working, can you please help me to identify issue.
{AvgIf(Optimist.Legal_Entity.Model.Current_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Prior_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Prior_Prior_Yr.Commercial_and_Industrial___EBIT___Value !=0)/1000}
Thanks
Pat
Last edited by Designer on Wed Feb 17, 2016 11:42 pm, edited 1 time in total.
Re: how to use average function ?
Hello.
The Avg is an aggregate function. It's impossible to use it this way.
Please, try to use simple arithmetic operators.
Could you specify how this function should work?
Thank you.
The Avg is an aggregate function. It's impossible to use it this way.
Please, try to use simple arithmetic operators.
Could you specify how this function should work?
Thank you.
Re: how to use average function ?
Hi
I want to calculate Average of 3 values, these values are from 3 financial year statements in most cases but if the user has choose only 2 years it should average of two years.
I am building interactive report, we have few scenarios; e.g. May not have all 3 years data point, 0 value or negative values and in any case I don’t want to get calculation or division error.
Thanks
I want to calculate Average of 3 values, these values are from 3 financial year statements in most cases but if the user has choose only 2 years it should average of two years.
I am building interactive report, we have few scenarios; e.g. May not have all 3 years data point, 0 value or negative values and in any case I don’t want to get calculation or division error.
Thanks
Re: how to use average function ?
Hi,
I have used this formula
{Totals.Avg(Optimist.Legal_Entity.Model.Historical_Current_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Historical_Prior_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Historical_Prior_Prior_Yr.Commercial_and_Industrial___EBIT___Value)}
getting error
"There are compilation errors in the Report Template. The tope 1 errors of 1 are : --- Text 182: No overload for method 'Avg' takes 4 arguments"
Can you please help?
Thanks
Pat
I have used this formula
{Totals.Avg(Optimist.Legal_Entity.Model.Historical_Current_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Historical_Prior_Yr.Commercial_and_Industrial___EBIT___Value,
Optimist.Legal_Entity.Model.Historical_Prior_Prior_Yr.Commercial_and_Industrial___EBIT___Value)}
getting error
"There are compilation errors in the Report Template. The tope 1 errors of 1 are : --- Text 182: No overload for method 'Avg' takes 4 arguments"
Can you please help?
Thanks
Pat
Re: how to use average function ?
Hello.
Please, use next expression:
You could add additional check if you don't need to calculate null values.
Thank you.
Please, use next expression:
Code: Select all
(value1+value2+value3)/3
Thank you.