Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Creating aggregates on SSRS Expand / Collapse
Author
Message
Posted Saturday, June 22, 2013 12:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, June 22, 2013 6:38 AM
Points: 1, Visits: 9
Hi Everyone,

I have been working on a SSRS report and could not make it work.

I have a data set like shown below:

Data Set
Item Order OrdQty Comp Qty Cost
X Z 10 A 4 41
X Z 10 B 5 45
X Y 5 C 6 24
X Y 5 D 4 21
X W 20 E 2 40

I would like to have a result like shown below:

Result
Item Order OrdQty Comp Qty Cost
X Z 10 A 4 41
B 5 45
OrdTotal 10 9 86
Y 5 C 6 24
D 4 21
OrdTotal 5 10 45
W 20 E 2 40
OrdTotal 20 2 40

ItemTotal 35 9 171

9 I was wable to get right ItemTotal for Qty
171 I was able to get right ItemTotal for Cost
35 I could not get this working. I tried expression sum(avg(OrdQty))

I was able to get right value for Qty and cost but I could not get a right value for ItemTotal by trying few things. One of the expressions I tried is shown above. Any help will be highly appreciated.

Thanks

Sar






Post #1466437
Posted Saturday, June 22, 2013 1:37 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 28, 2014 1:02 PM
Points: 150, Visits: 445
I suspect the problem can be resolved by applying a "scope" to one or both of your aggregate functions. It is difficult to tell for sure because of the lack of formatting in your post. Perhaps a screenshot showing the tablix and highlighting the value that you are having trouble with would help clarify the solution.
Post #1466483
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse