Forum Discussion
Count based on another column
- 8 years ago
hello misul,
You could try:
Column = CALCULATE( DISTINCTCOUNT(Table1[Route]), ALLEXCEPT(Table1,Table1[Customer]) )
- 8 years ago
ChrisMendoza Correct, the intention is to use DistinctCountofRoutes as a slicer.
When I use the calculated column, the values are summed. So I put the column to "Don't Summarize" and it seems to work now. Thanks!Calculated Column:
Column = CALCULATE( DISTINCTCOUNT(Table1[Route]), ALLEXCEPT(Table1,Table1[Customer]) )
Measure:
Measure= CALCULATE( DISTINCTCOUNT(Table1[Route]), ALLEXCEPT(Table1,Table1[Customer]) )
I realised that the same formula can be used as a measure too. But as measures cannot be used in Slicers. I will stick with Calculated Column (without summarizing it).
I've found something usefull if you want to display it in a cardbox : just put both of your column in a multiple line card box and select the distinct option
- misul8 years agoHelper I
Thanks for your help. But I need the Distinct Count as a Column/Measure so that I can use this as a slicer later on.
When I select Distinct Count = 1, show me all the customers which are having 1 route (i.e Customer C,D,E)
When I select Distinct Coutn =4, show me all the customers which are having 4 Routes. (i.e. Customer A)
Any further ideas?