none
pie chart - group together multiple items into a single slice RRS feed

  • Question

  • I'm creating a pie chart. It shows how many units of each product was sold as a percentage of the total. I've been able to do this easily. What I want to do now is take any product which has sold less than 5%, add them all up, and put them into a slice called 'Other'.

     

    For example, let's say I sold 100 units with this breakdown:

    50 units of Product A

    30 units of Product B

    10 units of Product C

    4 units of Product D

    3 units of Product E

    3 units of Product F

     

    D,E,F would be combined into a single slice on the pie chart with a value of 10% and labeled 'Other'

     

    Filtering them out is easy, I just compare the value of =CountRows() divided by total value, and the threshold.

    Taking these values and putting them together into a single pie slice is the tricky part.

     

    I've tried playing around with the category and series groups but that didn't help.

     

    How would I do this?

     

    Thanks.

     

    Monday, August 18, 2008 10:10 PM

Answers

  • If you are using Reporting Services 2008, there are properties available on the pie chart that enable you to specify a threshold (either in value or percentages) for placing values in a collected slice.   They are under the custom attributes area in the property pane.

     

    -Sean

     

    Thursday, August 21, 2008 10:31 PM

All replies

  • Put a calculated field in your dataset and use this statement for the new field

     

    =IIF(Fields!UnitsCount.Value<10,"Others",Fields!Product.Value)

     

    Now, Use this new field in place of Product field.

     

    Regards,

    Rohit Kapoor

    Wednesday, August 20, 2008 5:53 AM
  • Thanks. unfortunately your way groups by absolute number, not percentage (in my example the total number was 100 but that won't always be the case). I want the threshold to be something like 10% or 5%.

     

    edit: Perhaps your calculated value would be a percentage, I'm not sure how to do this though.

     

    What I would really like is to show something like the top 10 products, and group the rest under "Other". That would be the most ideal. I don't think that is possible though, so a percentage would be OK.

     

    Thursday, August 21, 2008 6:24 PM
  • If you are using Reporting Services 2008, there are properties available on the pie chart that enable you to specify a threshold (either in value or percentages) for placing values in a collected slice.   They are under the custom attributes area in the property pane.

     

    -Sean

     

    Thursday, August 21, 2008 10:31 PM