Forum Discussion
thegusman
6 years agoHelper I
Distinct Count in Query Editor... Is Group by the only solution
I have multiple columns that I need to do a distinct count within query editor. It seems that Group By is the only option... Do I need to preform a group by for every column, delete the extra colu...
thegusman
6 years agoHelper I
| Fruit | Vegetable | FruitCount | VegetableCount |
| Apple | Carrot | 1 | 2 |
| Orange | Carrot | 3 | 2 |
| Peach | Cucumber | 2 | 2 |
| Peach | Tomato | 2 | 1 |
| Orange | Onion | 3 | 1 |
| Orange | Cucumber | 3 | 2 |
artemus
6 years agoMicrosoft Employee
Ok, you do realize that your table isn't normalized though? E.g. In your example above, you have Orange 3 times, and for all 3 times FruitCount is 3. This can cause issues when you aggergate it on the visualization layer.
It is possible to do this, but it may not be what you want.