jmuffintop
New Member
- Joined
- Jun 20, 2018
- Messages
- 1
I am trying to calculate a live sales comp for 2017/2018.
In order to do the basic comp calculation, I need to sum 2017 sales up to the last corresponding sales input line for 2018. In this example it would be 2000. If I entered sales for 6/4/2018, the new aggregate sum for 2017 would be 2500. Any idea how to accomplish this?
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Date[/TD]
[TD]Sales[/TD]
[TD][/TD]
[TD]Day[/TD]
[TD]Date[/TD]
[TD]Sales[/TD]
[/TR]
[TR]
[TD]Thurs
[/TD]
[TD]6/1/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Thurs[/TD]
[TD]5/31/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Fri[/TD]
[TD]6/2/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Fri[/TD]
[TD]6/1/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Sat[/TD]
[TD]6/3/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Sat[/TD]
[TD]6/2/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Sun[/TD]
[TD]6/4/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Sun[/TD]
[TD]6/3/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Mon[/TD]
[TD]6/5/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Mon[/TD]
[TD]6/4/2018[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Tues[/TD]
[TD]6/6/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Tues[/TD]
[TD]6/5/2018[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Weds[/TD]
[TD]6/7/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Weds[/TD]
[TD]6/6/2018[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Thurs[/TD]
[TD]6/8/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Thurs[/TD]
[TD]6/7/2018[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Fri[/TD]
[TD]6/9/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Fri[/TD]
[TD]6/8/2018[/TD]
[TD]-[/TD]
[/TR]
</tbody>[/TABLE]
-
In order to do the basic comp calculation, I need to sum 2017 sales up to the last corresponding sales input line for 2018. In this example it would be 2000. If I entered sales for 6/4/2018, the new aggregate sum for 2017 would be 2500. Any idea how to accomplish this?
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Date[/TD]
[TD]Sales[/TD]
[TD][/TD]
[TD]Day[/TD]
[TD]Date[/TD]
[TD]Sales[/TD]
[/TR]
[TR]
[TD]Thurs
[/TD]
[TD]6/1/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Thurs[/TD]
[TD]5/31/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Fri[/TD]
[TD]6/2/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Fri[/TD]
[TD]6/1/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Sat[/TD]
[TD]6/3/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Sat[/TD]
[TD]6/2/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Sun[/TD]
[TD]6/4/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Sun[/TD]
[TD]6/3/2018[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Mon[/TD]
[TD]6/5/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Mon[/TD]
[TD]6/4/2018[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Tues[/TD]
[TD]6/6/2017[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]Tues[/TD]
[TD]6/5/2018[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Weds[/TD]
[TD]6/7/2017[/TD]
[T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