chryslerDAWGs
New Member
- Joined
- Oct 8, 2015
- Messages
- 3
I have been stumped by this issue for the past few days trying to sum up the rows based on this MAXX formula in PowerPivot.
Basically I want it to sum up the productive duration by station over a period of time and if it is 2 times greater than the "station time in cycle" use the sum of that time and sum for the month the total time .
Issue I am having is if I break it down by every day in a month. I get the correct output for that day, but when I look at the summation of all of them, it is not correct. I believe what is happening is it takes the total productive duration of the entire month and compares it to the total "station time in cycle" and chooses the max between those instead of looking at each day.
Below are the values I have for each day and then the sum of the month. Month according to PowerPivot is 588.8, but if you were to sum the rows you would get 614.1.
How do I get the whole month the sum the individual dates by a station?
station 580
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64"]September[/TD]
[TD="class: xl118, width: 64, align: right"]588.8[/TD]
[/TR]
[TR]
[TD]9/1/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/2/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/3/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/4/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/5/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/6/2015[/TD]
[TD="class: xl118, align: right"]23.2[/TD]
[/TR]
[TR]
[TD]9/7/2015[/TD]
[TD="class: xl118, align: right"]22.5[/TD]
[/TR]
[TR]
[TD]9/8/2015[/TD]
[TD="class: xl118, align: right"]19.0[/TD]
[/TR]
[TR]
[TD]9/9/2015[/TD]
[TD="class: xl118, align: right"]19.0[/TD]
[/TR]
[TR]
[TD]9/10/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/11/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/12/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/13/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/14/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/15/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/16/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/17/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/18/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/19/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/20/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/21/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/22/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/23/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/24/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/25/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/26/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/27/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/28/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/29/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/30/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
</tbody>[/TABLE]
Code:
highest Sched Prod Time (min):=MAXX(summarize(Stations,Stations[Station],"Duration1",IF(sum([prdDur])*2<[Station time In Cycle],[Station time In Cycle],sum([prdDur]))),[Duration1])/600
Basically I want it to sum up the productive duration by station over a period of time and if it is 2 times greater than the "station time in cycle" use the sum of that time and sum for the month the total time .
Issue I am having is if I break it down by every day in a month. I get the correct output for that day, but when I look at the summation of all of them, it is not correct. I believe what is happening is it takes the total productive duration of the entire month and compares it to the total "station time in cycle" and chooses the max between those instead of looking at each day.
Below are the values I have for each day and then the sum of the month. Month according to PowerPivot is 588.8, but if you were to sum the rows you would get 614.1.
How do I get the whole month the sum the individual dates by a station?
station 580
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64"]September[/TD]
[TD="class: xl118, width: 64, align: right"]588.8[/TD]
[/TR]
[TR]
[TD]9/1/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/2/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/3/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/4/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/5/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/6/2015[/TD]
[TD="class: xl118, align: right"]23.2[/TD]
[/TR]
[TR]
[TD]9/7/2015[/TD]
[TD="class: xl118, align: right"]22.5[/TD]
[/TR]
[TR]
[TD]9/8/2015[/TD]
[TD="class: xl118, align: right"]19.0[/TD]
[/TR]
[TR]
[TD]9/9/2015[/TD]
[TD="class: xl118, align: right"]19.0[/TD]
[/TR]
[TR]
[TD]9/10/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/11/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/12/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/13/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/14/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/15/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/16/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/17/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/18/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/19/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/20/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/21/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/22/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/23/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/24/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/25/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/26/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/27/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/28/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/29/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
[TR]
[TD]9/30/2015[/TD]
[TD="class: xl118, align: right"]20.4[/TD]
[/TR]
</tbody>[/TABLE]