Highlight cell or row in SSRS Tablix

Ali Ahad 131 Reputation points
2024-06-12T02:04:52.5266667+00:00

Hello,

I have a Tablix with multiple temperatures values for a patient taken in a day. Was wondering if I can highlight the row/cell with the highest temperature, in this case 101.5

User's image

Let me know if this can achieve via expression.

Thanks,

Ali.

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.
2,940 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 37,671 Reputation points
    2024-06-13T03:18:28.34+00:00

    Hi @Ali Ahad,

    You may need to edit your dataset first to get the max value in your group.

    I used below code and when the RNum=1, it will show the max value.

    SELECT *,ROW_NUMBER()OVER(PARTITION BY ID ORDER BY TEMPA DESC) AS RNum
    FROM TEST0613
    

    And then choose the row and then go to background color, use below expression.

    =iif(Fields!RNum.Value="1","red","No color")
    

    You may set the visibility of RNum column as hide.

    User's image

    1 person found this answer helpful.

  2. ZoeHui-MSFT 37,671 Reputation points
    2024-06-12T03:04:58.93+00:00

    Hi @Ali Ahad,

    Choose the row and then go to background color, use below expression.

    =iif(Fields!temperature.Value=max(Fields!temperature.Value,"DataSet1"),"red","No Color")

    User's image

    User's image

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


  3. Olaf Helper 45,106 Reputation points
    2024-06-12T16:33:32.4933333+00:00
    0 comments No comments

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.