How to combine aggregates within a group with aggregates across groups within SSRS

后端 未结 2 1858
我寻月下人不归
我寻月下人不归 2020-12-03 18:01

With this dataset:

Category | Amount
A        | 5
A        | 3
B        | 6
B        | 2
B        | 1
C        | 7

I want to create a tabli

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 18:20

    You could have used Scope descriptors to identify the groups that the SUM is to be run against:

    • Category group is defined in tablix Row Groups.
    • DataSet1 is the name of the dataset.

    Grouped Amount: [Sum(Amount)]

    Dataset Total: SUM(Fields!Amount.Value, "DataSet1")

    Percentage: SUM(Fields!Amount.Value, "Category") /SUM(Fields!Amount.Value, "DataSet1")

提交回复
热议问题