问题
In Microsoft Sql Server Reporting Services 2008 R2 Matrix, I'd like to add a column that shows the percentage of one data item divided by the total count of that row's data items.
Total's expression is =Sum(Fields!Count.Value)
. How would I access the row's sum of Success from Success Percent so that I can do something like =SUM(Fields!Count.Value WHERE Fields!Name.Value = "Success")/SUM(Total)
?
Adv.Name Success Failed Total Success Percent A 2 8 10 20% B 10 0 10 100% C 8 2 10 80% ---------------------- Data Items ----------- Column Grp Total

Thank you!
回答1:
Ah! This is rather easy! Aparently, the experession inside SUM is executed once per data item, allowing me to use a standard Iif statement to do the necessary filtering.
=SUM(Iif(Fields!Status.Value = "Success", Fields!Count.Value, 0))/SUM(Fields!Count.Value)
来源:https://stackoverflow.com/questions/12203597/getting-ssrs-matrix-row-total-for-a-particular-column-value