Hi All,
Fairly new to alteryx and I've been stuck on an issue for several days now. I have 2 data sets, one data set shows discounts on products and the other data set shows # of units sold at specific prices. There can be multiple discounts for any one product. What I need to do is bring in the number of units sold at or below each price but I can't double count units. For example, say I sold 5 units at $10, 5 units at $9, 5 units at $8 and 5 units at $7. Let's say in the discount table for this product, there were discounts at $10 and $8. I need the units sold column for $10 to show 10 units, and the units sold for $8 to show 10 units. I can't figure out how to not double count units for each discounted price interval. For example, there are 20 units sold at or below $10 but because there is a 2nd discounted price at $8, I only want to sum units between $10 and $8. I'm currently showing 20 units at or below $10 and 10 units at or below $8 implying we sold 30 units but really it should equal 20.
Data Set 1:
| Product | Discounted Price |
Product 1 | $10 |
| Product 1 | $8 |
Data Set 2:
| Product | Selling Price | Units Sold |
| Product 1 | $10 | 5 |
| Product 1 | $9 | 5 |
| Product 1 | $8 | 5 |
| Product 1 | $7 | 5 |
Goal:
| Product | Discounted Price | Units Sold at or Below Discounted Price |
| Product 1 | $10 | 10 |
| Product 1 | $8 | 10 |