0

我想突出显示早于当前月份的所有月份。通过在 Reporting Services 中创建表达式。我有一个月的这个表达,它有效:

=IIF(month(Fields!Date.Value) < month(today()), "Gold", "White")

现在我想添加年份作为过滤器只是为了安全,不知道如何做到这一点:

=IIF(month(Fields!Date.Value) < month(today()), "Gold", "White") & IIF year(Fields!Date.Value) <= year(today())

任何人?

4

1 回答 1

1

尝试这个

=IIF(month(Fields!Date.Value) < month(today()) AND year(Fields!Date.Value) <= year(today()), "Gold", "White")

这可能不是正确的做法,但同时希望这会有所帮助

=IIF((year(Fields!Date.Value)< year(today())) OR (month(Fields!Date.Value) < month(today()) AND year(Fields!Date.Value) = year(today())), "Gold", "White")

如果你描述你想做什么,可能会有更好的方法

于 2012-09-28T09:10:30.690 回答