Reputation: 179
I got Table 1 and Table 2 based on a same dataset, but different groupings.
For Table 1, it groups on Group 1 and Group 2, For Table 2, it groups on Group 1 only. I want something like the result table - to combine the results from Table 1 and Table 2.
The logic is =iif( Field name is C, sum values based on Group 2, sum values based on Group 1). It should be easy, but I can not figure out how to achieve that. Thank you for your help in advance.
Upvotes: 1
Views: 806
Reputation: 14108
You can use an expression to determine the scoping group.
Create a tablix and set the group 1
like below (in my case Group3
in Column Groups). Then right click the group and go to Group properties
.
In the General
tab add an expression for Group on
property and put this expression:
=IIF(
Fields!Group.Value="C",
Fields!SubGroup.Value,
Fields!Group.Value
)
Use the same expression in the header cell of the column group (the cell selected in the above image).
It will preview the following tablix:
Let me know if this helps you.
Upvotes: 1