Hello,
I have following observable collection: (Columns represent properties of class Product)
ID Name Division Sales
1 Levis Jeans MENS £1,34,234.00
2 Levis Shirt MENS £2,32,312.00
3 Provouge Jeans MENS £1,42,345.00
4 Levis Jeans WOMENS £1,89,234.00
5 Levis TShirt WOMENS £1,00,534.00
I want to display this data in pivot in below mentioned format:
Division Sales Sales %
MENS £5,08,891.00 63.7181826%
WOMENS £2,89,768.00 36.2818174%
Grand Total £7,98,659.00 100.0%
Here, I am not able to find out the % sales per division in pivot grid. Please let me know, if this is possible using custom aggregator.
Let me know if you need any clarification.
Thanks in advance...
Rohan
Hello Rohan,
Thank you for your post. I have been looking into and I can suggest you see how to implement a custom aggregator in the feature browser under xamPivotGrid / Display / FlatData Aggregators section.
Hope this helps you.
Hi Stefan,
Thanks for your reply... Do you have any sample solution for my problem? I went through feature browser but I could see only Avg, Max, Min & Sum aggregators and not percentage of total... :(
I am looking for result something like shown in attached image....
Thanks.
UPDATE: It appears to be working ok with silverlight.
There is a problem however.
It seems that PercentOfTotalAggregator works only with a DoubleSumAggregator as one of its parts.
DecimalSumAggregator, Int32SumAggregator will not work.
To reproduce this, do the following changes in the sample project, right where the Amount of Sale Sum and Amount of Sale Percentage measures are added:
the percentage measure doeas not appear, though the sum aggregator works correctly
Any thoughts?
Any news on the above issue (PercentageOfTotalAggregator only working with DoubleSumAggregator and not DecimalSum, Int32Sum etc)? Stefan maybe you can help?
Hello Spyros,
I have logged this with development under ID: 144087 and I have also created a support ticket on your behalf: CAS-117892-R5L7P1 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://es.infragistics.com/Membership/MySupport.aspx
Thanks stefan, I am waiting for the fix.
I am also evaluating the solution offered by Plamen, and although it techically works, there is a huge performance hit on large cubes.
I suspect the constant casting to double is resource intensive.
Do you have any timeframe for the service release?
The next service release is scheduled for the end of June, but I cannot guarantee that the fix will be included there.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
...and with the latest service release it works!
I am now evaluating performance, and I have also noticed that the behaviour of the PercentOfTotalAggregator seems a bit strange, but the basic idea is now applicable.
Thanks!