Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Hide data label for pie chart slices under 10%


Hide data label for pie chart slices under 10%

Author
Message
jchicky
jchicky
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
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.
Ray M
Ray M
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1641 Visits: 1076
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), "")
jchicky
jchicky
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 44
Sorry for the double post.
jchicky
jchicky
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
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).
jchicky
jchicky
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 44
bump, any suggestions?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search