0

I want to highlight the Top and Bottom 10% of values in my SSRS Table.

The sample table should look like this - I have prepared below in Excel Sheet,

enter image description here

Is it possible in SSRS-2016?

Pedram
  • 6,256
  • 10
  • 65
  • 87
Rameshwar Pawale
  • 632
  • 3
  • 17
  • 35

1 Answers1

0

Can be achieve using below SQL query and SSRS expression.

;WITH cte AS (
SELECT TOP (10) PERCENT MARKS,EmpName, 1 Ten FROM TableName ORDER BY MARKS
UNION ALL
SELECT TOP (10) PERCENT MARKS,EmpName, 2 Ten FROM TableName ORDER BY MARKS DESC
)

SELECT m.EmpName,
       m.Marks,
       CASE 
            WHEN cte.Ten = 1 THEN 'Green'
            WHEN cte.Ten = 2 THEN 'Red'
            ELSE ''
       END RedGreen
FROM   TableName m
       LEFT JOIN cte
            ON  cte.Marks = m.Marks 

Once dataSet is ready, we just need to set expression for Fill Color,

enter image description here

Let me know if you need more help.

Community
  • 1
  • 1
Pedram
  • 6,256
  • 10
  • 65
  • 87