Conditional Formatting nneds to compare cell value to same column in last row
Hello, I'm working on a Top 5 report. The stored procedure returns 6 rows, which are loading nicely into a tablix in Report Builder 3. The last row is hidden. The other rows need their cell backgrounds set to Color.LightBlue if their value is >= the value of the same cell in the (hidden) 6th row. For Example: Entity Q1 Q2 Q3 Q4 -------------- -------- -------- ------- -------- Company A 14,000 20,000 20,004 31,030 Company B 13,000 27,000 20,005 31,040 Company C 11,000 25,000 20,003 31,050 Company D 17,000 21,000 20,002 31,020 Company E 9,000 20,000 20,001 31,010 Threshold 12,000 23,000 20,003 31,035 In the Q1 column, the 14,000 13,000 and 17,000 cells would be shaded. Complicating matters is that I have done very little SSRS work in the past. I've seen samples of shading based on other columns int he row, but not of shading based on data in other rows. Is there a syntax similar to "Rows(5)!Filelds!Q1Val" ? Or some other way to use the value from the last row in the conditional formatting for the row in question? Thanks for any insite! Regards, -Jay
March 17th, 2011 11:49pm

Hi Jay, Based on the example dataset you provided, we can create a report by the following steps: Insert a Tablix to the report, add each data field from dataset to the cell in Tablix detail row. In order to hide the last row, please select the (Details) item in Grouping pane, and then specify the Hidden property to the expression like =(Fields!Entity.Value=Last(Fields!Entity.Value, "DataSetName")) Select the detail cell in Q1 column, specify the BackgroundColor property to the expression like =IIf(Fields!Q1.Value>=Last(Fields!Q1.Value, "DataSetName"),"LightBlue","NoColor") Report step 3 to speify the similar expressions to the BackgroudColor properties of the other datail cells. Please be aware to change the parameters in the expression based on your report. If you have any more questions, please feel free to ask. Thanks, Tony ChainTony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2011 12:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics