[英]SSRS : How to aggregate on certain values of a column?
I have a column (Say PriceA) in SSRS which gets populated based of Expression. 我在SSRS中有一列(Say PriceA),该列基于Expression填充。
PriceA.value PriceA.value
IIF((Fields!MOP.Value = "PRIV" OR Fields!MOP.Value = "FACI" OR Fields!MOP.Value = "GUAR" OR Fields!MOP.Value = "CASH"
OR Fields!MOP.Value = "CHRG" OR Fields!MOP.Value = "INV"),
IIF(Fields!UDRx.Value,"U/D",Fields!TtlPrice.Value),
IIF(Fields!elecadj.Value="0" AND Fields!elecadj2.Value="0", IIF(Fields!UDRx.Value,"U/D",IIF(Fields!MOP2.Value="0",Fields!Copay.Value,"")),
IIF(Fields!UDRx.Value,"U/D",Fields!PatientPayAmt.Value)
)
)
The Value in PriceA can be "U/D" or Zero or some value as "150.00". PriceA中的值可以是“ U / D”或零,也可以是“ 150.00”。 Now I want to display at the end of the report, an aggregate of the rows in that column, discarding the values $0.0 and "U/D".
现在,我想在报告的末尾显示该列中的行的汇总,丢弃值$ 0.0和“ U / D”。
How do I do that? 我怎么做?
I also have another column where it shows values based off off 2 different expression, that I need to aggregate. 我还有另一列,其中显示了基于2个不同表达式的值,我需要对其进行汇总。 That one is not working either.
那一个也不起作用。
2ndPriceA_expression 2ndPriceA_expression
IIF((Fields!MOP.Value = "PRIV" OR Fields!MOP.Value = "FACI" OR Fields!MOP.Value = "GUAR" OR Fields!MOP.Value = "CASH"
OR Fields!MOP.Value = "CHRG" OR Fields!MOP.Value = "INV"), " ",
IIF(Fields!elecadj.Value="0" AND Fields!elecadj2.Value="0",
IIF(Fields!UDRx.Value="0",Format(Fields!TtlPrice.Value,"C"),"U/D") ,
IIF(Fields!UDRx.Value="0",Format(Fields!Payor1PaidAmt.Value,"C"),"U/D")
)
)
2ndPriceB_expression 2ndPriceB_expression
IIF(Fields!MOP2.Value<>"",
IIF(Fields!elecadj.Value="0" and Fields!elecadj2.Value="0"
,IIF(Fields!UDRx.Value="1","U/D",Fields!Copay.Value)
,IIF(Fields!UDRx.Value="1"
,"U/D"
,IIF(Fields!elecadj2.Value="0"
,Fields!Copay.Value
,Fields!Payor2PaidAmt.Value
)
)
)
," ")
I need to show aggregate of 2ndPriceA & 2ndPriceB in a 3rd cell. 我需要在第三个单元格中显示2ndPriceA和2ndPriceB的集合。 Sorry I'm 2 weeks new to SSRS.
抱歉,我刚接触SSRS 2周。
Thanks in advance. 提前致谢。 any help is appreciated.
任何帮助表示赞赏。
只需对IIF()表达式做一个SUM(),它将过滤掉您不想求和的值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.