OK, this should pretty easy, but I can't locate any examples of what I need to save my life!! Let's say I have data that looks like the table below. I am trying to count the number of DISTINCT instances of Order_Line_No within Order_No. I can count all of the Order_No's, or I can count all of the DISTINCT values within Order_Line_No (so in other words, I'd get a 3 for the three values of 10, 20, and 30. But what I need to get is a result of 7, two for Order_No 123, 10, and 20, three for Order_No 456, 10, 20, and 30, and then two more for 789, 10, and a 20. Thanks in advance for any assistance!!
Order_No | Order_Line_No |
123 | 10 |
123 | 10 |
123 | 20 |
456 | 10 |
456 | 20 |
456 | 30 |
789 | 10 |
789 | 10 |
789 | 20 |
789 | 20 |