Forum Discussion
MFester
7 years agoFrequent Visitor
Distinct counting with conditions
Hello, Hopefully someone can help me. I need to distinct count with a condition. I have a list of sellerID, a list of products and a date. Basically i want to know how many different...
MFester
7 years agoFrequent Visitor
| SellerID | Product | Date |
| 1 | Apple | 1.1.2019 |
| 1 | Banana | 1.1.2020 |
| 2 | Chair | 1.1.2021 |
| 3 | Apple | 1.1.2022 |
| 4 | Apple | 1.1.2023 |
| 5 | Apple | 1.1.2024 |
| 5 | Banana | 1.1.2025 |
| 5 | Chair | 1.1.2026 |
Here is an example of the data.
I can't use a filter, because I need different groups in the same table/figure, therefor I think I need measures for each "group" i wanna create.
For instance I wanna know how many sellers have sold fruit, have many sellers furniture and so forth.
Because a seller can sell apple more than once i need distinct count.
The "or" suggestion could only have two groups. "Banana" and "apple", but if we also add "Orange" it doesn't work I think.
Thank you all for your helpful tips.