joshbjames
New Member
- Joined
- Jul 25, 2017
- Messages
- 33
This is similar to a question I have asked before. Basically, I have a list of products and the product number repeats on a new row for every price variance we have sold it for. I would like to find the price we have sold it for most frequently.
Variables to account for would be:
1 - It has only been sold at one price. (Return that value).
2 - Two different prices occur the exact same amount of times. (Return the lowest of the 2 prices).
3 - No particular price occurred more than another (Return the lowest price).
Here is some sample data with as many scenarios I could think of and the result I'd like.
<tbody>
</tbody>
Variables to account for would be:
1 - It has only been sold at one price. (Return that value).
2 - Two different prices occur the exact same amount of times. (Return the lowest of the 2 prices).
3 - No particular price occurred more than another (Return the lowest price).
Here is some sample data with as many scenarios I could think of and the result I'd like.
Product Number | Price | Most Common |
1234 | 2 | 2 |
1234 | 2 | 2 |
1234 | 1 | 2 |
5678 | 3 | 3 |
9012 | 4 | 4 |
9012 | 5 | 4 |
9012 | 4 | 4 |
9012 | 5 | 4 |
9012 | 3 | 4 |
3456 | 2 | 2 |
3456 | 3 | 2 |
3456 | 4 | 2 |
7890 | 5 | 5 |
7890 | 6 | 5 |
<tbody>
</tbody>