Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

How to find the maximum of group sums within a specific column using report builder 3.0

$
0
0

Hi

For each part number I am trying to find out in which week of a month did the largest daily shipment occur... so using report builder 3.0 in SSRS 2012 I can find daily, weekly and monthly totals for the units shipped but I am having a hard time thinking through the logic to find the daily max for each week.

in my data I can have multiple orders/shipments for the same product on the same day.

The ultimate goal is to set inventory levels

So..

In my matrix report I have
Row groups:
Classid => Product class
InvtID => Item Part Number

Column Groups:
FiscYr=> Fiscal Year
PerPost => Month or period the transaction occurred
Week_period => the week the transaction occurred
Day_period => The day that the transaction occurred

The aggregations are 
Sum(case_shipped) 
Max(case_shipped)

The Sum(case_shipped) is working as desired but the Max(case_shipped) is picking out the max amount shipped on any one order when looking at the week, month or fiscal period and that is not what I need.

I have attached a screenshot since a picture is worth more than my words. I have also included some sample data

I would very much appreciate any thoughts on this. I am guessing that the solution has something to do with using the inscope function but I can't wrap my head around how to use it

Thank you 

Tom D

Here is some sample data for Product A

Invtid Case_ship Trandate    FiscYr   PerPost   week_period        day_period
A         10           1/1/2104    2014        1              1                           1
A           3           1/1/2014    2014        1              1                           1
A         50           1/2/2104    2014        1              1                           2
A         30           1/3/2014    2014        1              1                           3
A         20           1/9/2104    2014        1              2                           2
A          5            1/9/2104    2014        1              2                           2
A        20          1/10/2014    2014        1              2                           3
A        60          1/10/2104    2014        1              2                           3

On 1/1/2104 I shipped a total of 13 cases
On 1/2/2104 I shipped a total of 50 cases
On 1/3/2104 I shipped a total of 30 cases
On 1/9/2014 I shipped a total of 30 cases
On 1/10/2014 I shipped a total of 80 cases

On 1/9 I shipped a total of 25 cases

I would like to show that in week 1 the maximum number of cases shipped on any day is 50 (1/2/2014)
I would like to show that in week 2 the maximum number of cases shipped on any day is 80 (1/10/2104)

I would also like to show that in perpost (month) 1 the maximum number of cases shipped on any day is 80 (1/10/2104)


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>