Using Avg in a chart
Using Avg in a chart
Hi Aleksey & Team
I have a client who wants to display the average of a data series in a chart, but when we add the expression as Avg(BusinessObject.Column) then we get an error that "The name 'Avg' does not exist in the current context."
We are using the Silverlight 2016.1 version of the reporting control - how do we display an average of a data series as a chart?
thanks!
Matt
I have a client who wants to display the average of a data series in a chart, but when we add the expression as Avg(BusinessObject.Column) then we get an error that "The name 'Avg' does not exist in the current context."
We are using the Silverlight 2016.1 version of the reporting control - how do we display an average of a data series as a chart?
thanks!
Matt
Re: Using Avg in a chart
... sorry - I realised that I already asked this question before! I will try and create a new datasource from existing datasource. Your previous answer Aleksey mentioned to structure the Average in the SQL query, but that's not possible since we use business objects and not direct data source connection.
Re: Using Avg in a chart
... sorry - I realised that I already asked this question before! I will try and create a new datasource from existing datasource. Your previous answer Aleksey mentioned to structure the Average in the SQL query, but that's not possible since we use business objects and not direct data source connection.
Re: Using Avg in a chart
... I tried to create a new business object based on the existing business object, but it isn't quite clear that this will work - I tried to add a calculated column and got the same error "The name 'Avg' doesn't exist in the current context."
Is there any other way to show an Average of values in a chart?
thanks
Matt
Is there any other way to show an Average of values in a chart?
thanks
Matt
Re: Using Avg in a chart
Hello Matt,
Please try to use the Totals function.
If the issue still present, please send us a sample report with test data for analysis.
Thank you.
Please try to use the Totals function.
If the issue still present, please send us a sample report with test data for analysis.
Thank you.
Re: Using Avg in a chart
Hi Aleksey
I have attached a sample .mrt file to demonstrate the problem. Even using Totals.Avg() no value is calculated...
thanks
Matt
I have attached a sample .mrt file to demonstrate the problem. Even using Totals.Avg() no value is calculated...
thanks
Matt
Re: Using Avg in a chart
... plus also some sample test data...
Re: Using Avg in a chart
Hello.
Please, try to add the Read Only variable and use it in the Before Print event of the chart.
The average line could be shown with the Constant Line.
Please, look at the attached report template.
Thank you.
Please, try to add the Read Only variable and use it in the Before Print event of the chart.
The average line could be shown with the Constant Line.
Please, look at the attached report template.
Thank you.
- Attachments
-
- ChartAvg.mrt
- (13.67 KiB) Downloaded 906 times