我有一個包含兩列的報告。這兩列被命名爲「本月」或「上個月」。我正在嘗試在「本月」中與「上個月」中的數據相關的數據單元添加背景顏色。SSRS基於動態列中的數據的動態背景顏色
我熟悉使用IIF語句的動態顏色編碼,但似乎無法弄清楚這一點。
下面,我想用一個LOOKUP命令來使用IIF,但我不確定我是否正確使用這個命令。任何幫助,將不勝感激。
=IIF(LOOKUP(Fields!Type.Value = "This Month", Fields!Type.Value, Fields!Count.Value, "ExecutiveFCAPS") < LOOKUP(
Fields!Type.Value = "Last Month", Fields!Type.Value, Fields!Count.Value, "ExecutiveFCAPS"), "LightGreen",
IIF(LOOKUP(Fields!Type.Value = "This Month", Fields!Type.Value, Fields!Count.Value, "ExecutiveFCAPS") = LOOKUP(
Fields!Type.Value = "Last Month", Fields!Type.Value, Fields!Count.Value, "ExecutiveFCAPS"), "Yellow",
IIF(LOOKUP(Fields!Type.Value = "This Month", Fields!Type.Value, Fields!Count.Value, "ExecutiveFCAPS") > LOOKUP(
Fields!Type.Value = "Last Month", Fields!Type.Value, Fields!Count.Value, "ExecutiveFCAPS"), "Orange", "Transparent")))
你有多少數據集?如果有人綁定到列(即Tablix)?數據集中的哪些字段。請編輯您的問題,將此信息輸入。謝謝 – 2013-02-19 23:02:58
這種複雜程度通常可以在您的數據集中得到最好的解決。使用SQL。這使您有機會調試和測試您的代碼。 – 2013-02-20 05:38:42
@PreetSangha,字段是FCAPSSubType,類型(包含本月或上個月),計數。 – EdwardT 2013-02-20 18:35:19