Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Calculated/Custom Measures for FlatDataSource in XamPivotGrid
posted

For .Net WPF XamPivotGrid:

Can you tell me if Calculated Measures are supported in FlatDataSource. Basically we will like to provide our own calculation for aggregating measures (e.g. weighted average instead of plain average).

I do see that Measures have aggregator which takes enum value and there are references to ByChildreen, ByAccount and Calculated.

I do not see any example and unable to determine how to use it.

Thanks

 

 

Parents
No Data
Reply
  • 7922
    posted

    Hi

    Sorry for delay.

     

    You can apply different aggregation function as you use follow code

     

    IOlapViewModel viewModel = pivotGrid.DataSource;

    viewModel.SetMeasureAggregator((IMeasureViewModel)viewModel.Measures[0], MeasureAggregator.Count);

    viewModel.RefreshGrid();

     

    For now only Sum, Min, Max, Count and Average have implementation. We work to implement and another  type of aggregation function in the future releases.

    Todor

Children