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

Finding Row, Column, Overall Averages

1 Answer 37 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
ahps
Top achievements
Rank 1
ahps asked on 16 Jun 2017, 05:04 AM

Hi,

firstly thanks so much for the work you've done in providing the Pivotgrid. It has great functionality straight out of the box and our clients will love it!  

My query is about row and column averages. I basically want to be able to highlight specific cells that fall below a row or column average. I know how to use the CellTemplateSelector to change the colour but don't know how to actually find the row, column or overall average so that I have an average threshold to compare the cell value against. For example, take the following grid...

           Q1    Q2    Q3    Q4

Fred     2       6       7      9

Wilma  10     10      3     9

How would I work out that Fred's average is 6 (2+6+7+9 / 4) or that the overall average is 7 (2+6+7+9+10+10+3+9 / 8) so that I can highlight the cells falling below the average?

Thanks for any help here : )

Iain.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 20 Jun 2017, 03:46 PM
Hello Ahps,

I already answered your question ticket  with ID 1114989. In summary, this is not supported out of the box. However, you can achieve your requirement by creating a custom LocalDataSourceProvider, exposing its Results protected property. And then using its GetAggregateResult() method.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PivotGrid
Asked by
ahps
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or