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 Spyros,
The error you see when you have DecimalSumAggregator or Int32SumAggregator is because PercentOfTotalAggregator internally operates with doubles only. I've attached a file with a custom aggregator you can use instead of PercentOfTotalAggregator until we provide a official fix for this issue. Let me know if this works for you.
Regards, Plamen
Any news on the above issue (PercentageOfTotalAggregator only working with DoubleSumAggregator and not DecimalSum, Int32Sum etc)? Stefan maybe you can help?
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?
Thanks for the example Stefan!
It is a good starting point, though it needs work when there are multiple dimensions in rows or columns.
Will this also work in Silverlight?
Hello both,
I have created a sample project with the fucntionality you want. Basically you need furst to add the sum measure, so that the percentage measure can be calculated based on the sums.
Hope this helps you.