Finding Row, Column, Overall Averages

2 posts, 0 answers
  1. ahps
    ahps avatar
    4 posts
    Member since:
    Sep 2014

    Posted 16 Jun Link to this post

    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.

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1402 posts

    Posted 20 Jun Link to this post

    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.
Back to Top