How to use iif statement to highlight values only when a decimal value but not .00

Gillian Steele 20 Reputation points
2023-10-04T00:22:14.9266667+00:00

Hi - I want to highlight values in a column when they are not 22.00 but 22.95 etc o only when the decimal values are more than 0.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

Accepted answer
  1. Q&A Assist
    2023-10-04T00:22:14.93+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To highlight values in a column only when the decimal values are more than 0, you can use the IIF function in combination with the DecimalPlaces property of the field. Here's an example expression that will highlight values in a column only when the decimal values are more than 0:

    =IIF(Fields!MyField.Value - Fix(Fields!MyField.Value) > 0, "Yellow", "No Color")

    In this expression, MyField is the name of the field that you want to format. The Fix function is used to return the integer portion of the value, and the IIF function is used to check if the decimal portion is greater than 0. If it is, the expression returns "Yellow" to highlight the value, otherwise it returns "No Color" to leave the value unhighlighted.


    References:

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.