Take the 2-minute tour ×

Using SSRS BIDS 2008 to create a Pie Chart in one of my reports.

What is the syntax of the statement I need to type into the Expression box to specify which colours I would like each particular field of the pie chart to be.

The value i need to specify different colours for is 'value2' and their are a total of 4 possible values.


share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Are you ENTIRELY SURE that the if statement predicate is correct?

It looks to me like "1.Proposal" is possibly a series label?

share|improve this answer
Youve nailed it, my problem was that 1.Proposal should have actually read as 1. Proposal - I was missing a space, thanks all for your help –  SelectDistinct Nov 4 '11 at 14:36
add comment

Answered a question on this yesterday! See Reporting services expression using Switch for the Switch syntax. Make sure you give it an even number of arguments.

Edit following your sample code - it should be Switch rather than SWITCH. Check the documentation here.

share|improve this answer
It has an even number of arguments, still not working, this is what I have so far... =SWITCH( Fields!status2.Value="1.Proposal","Green", Fields!status2.Value="2.Live","Red", Fields!status2.Value="3.On Hold","Khaki", Fields!status2.Value="5.Cancelled","Plum") –  SelectDistinct Nov 4 '11 at 14:15
Updated answer following your sample code. If it's still not working, an error message would be useful. –  Sir Crispalot Nov 4 '11 at 14:19
No error message, run the report and it just displays the bog standard colours from before, not my specified ones... –  SelectDistinct Nov 4 '11 at 14:25
What if you add a final catch-all condition with a unique colour like this: ..., True, "Pink") - then you'll at least know that the expression is being evaluated when it all goes pink! –  Sir Crispalot Nov 4 '11 at 14:32
add comment

Your Answer


