This is a migrated thread and some comments may be shown as answers.

Conditional totals

1 Answer 156 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lucien
Top achievements
Rank 1
Lucien asked on 31 Mar 2011, 03:29 AM
Hi all,

In my group footer(s) I am displaying averages (using Avg). However, I need these averages to exclude any zero and null values in the detail lines. How do I go about doing that?

Lucien Dol
QicSoluciens
Wellington, New Zealand

(Telerik Reporting Q1 2011 v5.0.11.316)

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 01 Apr 2011, 04:59 PM
Hi Lucien,

The Avg(Expression) aggregate by design returns the average of all non-null values from the specified expression. Additionally to avoid the zeros our suggestion is to use an IIF Function in the aggregate's expression: 
= Avg(IIf(Fields.Year<>0, Fields.Year, Null))

Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Lucien
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or