Hi,
According to your description, you want to change the each display as different color, when category group values is dynamic, right?
Follow the below example
In your scenario, you could specify the Fill color expression with Switch() or IIF() function. In my test environment, since we dont know how the dynamic category group changes, we specify each condition based on a fixed field. In your scenario, since category group values changed each time, the condition should refer to corresponding dynamic category group instead of a fixed field.
Or you could add an additional field in the dataset to store color for each category value. Then you could specify the Fill color expression with this field. For more information, please refer to this similar thread:How to Have Different Colors per Category in a Bar Chart in SSRS 2008 R2.
If you have any question, please feel free to ask.
Click on the Bar and then go to Series Properties and then Fill and write below Expressions
Change the Fields!MonathName.Value to your field you are using. Also change the Month Name to Full Name if your values are Full Month Name. I have used short month names.
=Switch(Fields!MonathName.Value="JAN","Green",
Fields!MonathName.Value="FEB","Blue",
Fields!MonathName.Value="MAR","Yellow",
Fields!MonathName.Value="Apr","Maroon",
Fields!MonathName.Value="May","Green",
Fields!MonathName.Value="Jun","Blue",
Fields!MonathName.Value="Jul","Yellow",
Fields!MonathName.Value="Aug","Maroon",
Fields!MonathName.Value="Sep","Green",
Fields!MonathName.Value="Oct","Blue",
Fields!MonathName.Value="Nov","Yellow",
Fields!MonathName.Value="Dec","Maroon",
)
All the best!
Hi DReddyC,
According to your description, you want to set the column bar chart color, right?
In your scenario, you can add a rownumber to the dataset query, and then use the field value to determine which color will be used. Please refer to the following sql query:
Modify the query as below:
select row_number() over (order by field) as number, * from table
Add the following expression to the color:
=Switch(Fields!number.Value mod 4 = 1, "Blue",
Fields!number.Value mod 4 = 2, "Orange",
Fields!number.Value mod 4 = 3, "Green",
Fields!number.Value mod 4 = 0, "Pink"
)
The result is like below:
Reference:
If you have any other question, please feel free to ask.
Regards,
Shrek Li