Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 20764

Get Sort Order Value

$
0
0

I have a column group that I am sorting manually. The column group will always display 4 columns even is some columns do not have data values. This sort works as designed.

Sort Order as Working Example

=Switch(Fields!Field.Value = 10, 1,
Fields!Field.Value = 20, 2,
Fields!Field.Value = 40, 4,
Fields!Field.Value = 30, 3)


My trouble: I have a separate expression to color the background of these columns according to their Fields!Field.Value.
Because some columns may not have values in them because of NULL values the background color will not show when Fill Expression:


=Switch(Fields!Field.Value = 10, "Red"),
Fields!Field.Value = 20, 'Green"),
Fields!Field.Value = 40, "Black"),
Fields!Field.Value = 30, "Yellow"))


My question: Is there any way to get back the column sort value in another expression instead of doing the fill switch expression
by Fields!Field.Value?

In other words instead of going off of Fields!Field.Value = [10, 20, 30, 40], I could go off of GetColumnSortValue = [1, 2, 3, 4]

=Switch( [GetColumnSortValue] = 1, "RED",
[GetColumnSortValue] = 2, "Green",
[GetColumnSortValue] = 3, "Black",
[GetColumnSortValue] = 4, "Yellow")

Any suggestions?


Viewing all articles
Browse latest Browse all 20764


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>