Ignore duplicates?

shophoney

Active Member
Joined
Jun 16, 2014
Messages
286
Hi I have a situation with my sales tables.

Everything was working fine till I found out that some items have 2 discounts applied to one item. This causes my system to look like the item was sold twice.

LOC#TRANS DATETIMETRANS#CUST#salespersonSKU#UNITS SOLDCOSTDISCOUNT CODEdisc_sourceDISCOUNTNET RETAILline_no
300002/06/16 12:00:00 AM12/30/99 3:53:52 PM67104200000BNNVUKB11246161$118.2520%DO-$27.50$110.001
300002/06/16 12:00:00 AM12/30/99 3:53:52 PM67104200000BNNVUKB11246161$118.2550P121515BO-$137.50$110.001


<tbody>
</tbody>
From above the item was sold once but received 2 discounts. One 20% off and the other was "50P121515"

Line#1 is the item sold. And should be one unit in total sold. But as there was 2 types of discounts used it lists units 2x.

I hope that is clear. Maybe i need to total units sold based on unique line numbers.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
It depends on your business logic. If 2 discounts are allowed then you need a separate table with the discounts per order line.
Otherwise you need some logic to select the 1 applicable discount, so you won't have multiple discounts per line.

If it is only about calculating the number sof items sold, then you can first remove duplicate combinations as you suggested.
But I wouldn't recommend it; you should prevent duplicate records in your Sales table.
 
Upvote 0

Forum statistics

Threads
1,225,730
Messages
6,186,698
Members
453,369
Latest member
positivemind

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top