First it groups by department then it sorts by Departments. It sorts again by total cost within the each departments. I am supposed to display total for units and costs for each department. Only supposed to display total for 10 barcodes. It shows the total but is showing the total for all the barcodes that exists within that department. For example: Total units for the Dept A should be 19 but it is displaying 57 because there more than 10 barcodes in department A. I tried, top N as shown here
Tried RunningValue but it gives me running total. I need total for each departments separately.
=RunningValue(Fields!Units.Value, Sum, Nothing)
I also looked the similar question but did not work.How to get total of top 10 sales in SSRS 2012. Here is my current output:
Output should be:
For Dept A: Total Units should be 19 and total cost should be: 144.40
For Dept B: Total Units should be 378 and total cost should be : 6097.70
Here is my design view: using the following to aggregate:
=Sum(Fields!units.Value)
=Sum(Fields!totalcost.Value)