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

BC30452 Error in Switch Statement

$
0
0

I'm using SSDT 12 and I'm writing an expression to dynamically change the cell backcolour based on its value and I'm getting a BC30452 error.

The field TwelveMonthsPercent is a calculated field derived from a formula so it should be numeric. The code below is my expression and I'm receiving an error stating:
the operator '<=' is not defined for types 'Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Field' and Integer.

=SWITCH(
Fields!TwelveMonthsPercent.Value >= 85 AND Fields!TwelveMonthsPercent <= 89,"PaleGoldenrod",
Fields!TwelveMonthsPercent.Value >= 90,"Red",
Fields!TwelveMonthsPercent.Value <= 84,"DarkSeaGreen"
)

I'm not sure why I'm getting the error but I hope someone can help.

Thanks in advance
Adam


Viewing all articles
Browse latest Browse all 10045

Trending Articles



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