Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Hide data label for pie chart slices under 10% Expand / Collapse
Author
Message
Posted Thursday, December 20, 2012 2:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 28, 2012 8:35 AM
Points: 9, Visits: 44
I'm working on a pretty simple pie chart in BIDS 08. I have 6 slices of pie and want to hide the data label for slices less than 10%. I assume this is an expression that gets entered into the Chart Series Labels' 'visible' property, but I don't know where to start.

If you all can help me out, I would greatly appreciate it. Part of what has me confused is that the expression will probably be written assuming the values of my data are percentages, but they're integers (aggregated counts). I believe this transformation from integers to percentages happens in the background and I wouldn't know how to write an expression for that.
Post #1399105
Posted Thursday, December 20, 2012 3:19 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Monday, July 7, 2014 1:06 PM
Points: 1,478, Visits: 1,025
Change the UseValueAsLabel to false.

Here's an example of an expression I just wrote to test this out.

If Revenue for Department / TotalRevenue > .1, then show Department revenue, else "" Blank
=iif(Sum(Fields!Revenue.Value) / Sum(Fields!Revenue.Value, "DataSet1") > .1, Sum(Fields!Revenue.Value), "")
Post #1399122
Posted Friday, December 21, 2012 9:16 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 28, 2012 8:35 AM
Points: 9, Visits: 44
Sorry for the double post.
Post #1399477
Posted Friday, December 21, 2012 9:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 28, 2012 8:35 AM
Points: 9, Visits: 44
Thanks for your help. I'm not sure exactly how to explain the problem I'm having...

UseValueAsLabel was already False. In the label property, I had #PERCENT{P0}, otherwise the labels would show the count for that particular category.

My DataSet1 has a query that groups 6 categories and counts each row in a column. For example:

total totalValue category categoryValue
1 1 Existing 100000000
10 10 New 100000001
13 13 Growth 100000002
etc, etc.

In the chart data, I have [total] in the Values area (no aggregate function used), and category in the Category Groups area. Everything previews great.. I just don't want to show slices under 10% because the chart is quite small and so the labels overlap when they're under 10%. When I try your expression, I get #Error (rsAggregateOfNonNumericData) for the labels (I put your expression in the label property).
Post #1399478
Posted Thursday, December 27, 2012 9:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 28, 2012 8:35 AM
Points: 9, Visits: 44
bump, any suggestions?
Post #1400671
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse