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
255
Weighted Average in xampivotgrid using flatdatasource
posted

Hi,

I've got a XamPivotGrid with a FlatDataSource working and I haven't been able to get the custom/ calculated measures working.

I need to achieve a weighted sum where the values and the weights are two measures present on the pivot table.

I was following the response from https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/45131/calculated-custom-measures-for-flatdatasource-in-xampivotgrid?ReplySortBy=CreatedDate

but the example link provided died and the pasted code has issues.

thanks

Parents
No Data
Reply
  • 29065
    Offline posted

    Hello Claudio, 

    The FlatDataSource does not currently support calculated measures. Calculated measures are only supported on XMLA data sources.  

    If you need a calculated measure then I recommend adding another field to your underlying data source that represents the calculated measure.  For example:

    public class Sale
    {
     public double AmountOfSale { get; set; }
     
     public double DoubledAmountOfSale { get { return AmountOfSale * 2.0; } }
    }

    We have a online topic that walks through on creating calculated measures. You may also refer to the following sample for more details. See below. 

    PercentageAggregator.zip

    You can suggest new product ideas for future versions (or vote for existing ones) at <https://ko.infragistics.com/community/ideas>.
    Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
    Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.

    Let me know if you have any questions. 

Children