问题
I have a report that breaks down financials by state. Here is what it looks like:
That is the tablix version of the data. I also have a chart as a map where I want to display the data visually.
The actual data is broken up like this:
NM City 100
NJ City1 100
NJ City2 100
NJ City3 100
NY City 100
NY City2 100
In SSRS, each state is a polygon. I want to set the fill color of that polygon to be a color based on the Total Value of that state.
The best way to do this would be to just set the color value equal to my formula against the total value. Then I would use that same line of code for every polygon and it would color code accordingly.
However, I do not think the polygons know which state they belong to. For example, is there any way to get the New York Polygon to only look at the NY state value?
In case there isn't, I'm trying to so a switch statement where for every polygon I'll have it only get the value where the state name equals whatever I manually input.
=SWITCH
(Max(Fields!State.Value, "CustomersByState") = "NE" , "10000"
Max(Fields!State.Value, "CustomersByState") = "NY" , "20000"
1=1,"Coral")
When I have that line be as the expression for the label name of that polygon (for testing, if I can make this work I can make anything work) it gives me an error and says comma, ')', or a valid expression continuation expected.
回答1:
I believe you need a comma after "10000" and "20000"
来源:https://stackoverflow.com/questions/57895055/ssrs-switch-statement-in-expression-is-not-working-color-code-a-polygon-in-a-ch