我需要在micorsoft报表生成器中的以下表达式中插入IIF,并且不断出现错误。我要说的是>> 1,1,“”
= Round((Fields!percent_excellent.Value + Fields!percent_good.Value)* 100,0)&“%(”&Round((((Fields!percent_excellent.Value + Fields!percent_good.Value)-Fields!peer_group。值)* 100,0)和“%)”
=IIF(Round((Fields!percent_excellent.Value + Fields!percent_good.Value) * 100,0) > 1,
100,
Round((Fields!percent_excellent.Value + Fields!percent_good.Value) * 100,0)) &
"% (" & Round(((Fields!percent_excellent.Value + Fields!percent_good.Value) - Fields!peer_group.Value) * 100,0) & "%)"
我认为您最好使用FORMATPERCENT将数字格式化为固定的小数位数并加上百分号。
=FORMATPERCENT(
IIF(
(Fields!percent_excellent.Value + Fields!percent_good.Value) * 100 > 1,
1,
(Fields!percent_excellent.Value + Fields!percent_good.Value) * 100
)
, 0) & " ("
FORMATPERCENT(((Fields!percent_excellent.Value + Fields!percent_good.Value) - Fields!peer_group.Value) * 100, 0) & ")"