本文转自:http://hi.baidu.com/oypx1234/item/5b35dec4e03a3ad697445266
=Switch(
Fields!MLWHLO.Value = "C01",CountDistinct(Fields!MLCAMU.Value)*12
,Fields!MLWHLO.Value = "C02",CountDistinct(Fields!MLCAMU.Value)
,Fields!MLWHLO.Value = "C30",CountDistinct(Fields!MLCAMU.Value)
,Fields!MLWHLO.Value = "C03",CountDistinct(Fields!MLCAMU.Value)
,Fields!MLWHLO.Value = "C36",CountDistinct(Fields!MLCAMU.Value)
)
此部分没有对MLCAMU是否为空进行另外处理。
————————————————————————————————
Sum(
IIF(Trim(Fields!MLCAMU.Value)="",
Switch(
Fields!MLWHLO.Value = "C01",12
,Fields!MLWHLO.Value = "C02",1
,Fields!MLWHLO.Value = "C30",1
,Fields!MLWHLO.Value = "C03",1
,Fields!MLWHLO.Value = "C36",1
)
,0
)
)
排除MLCAMU为空的情况