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).
hello misul,
You could try:
Column = CALCULATE( DISTINCTCOUNT(Table1[Route]), ALLEXCEPT(Table1,Table1[Customer]) )
Hi,
This is great. I also tried to use this formula in my dashboard, but unfortunately this didn't helped me much. The problem starts when I apply a filter to other columns.
For e.g. in the given example, Customer A has 4 routes. Let's assume there are other 3 customers - X, Y & Z who also have 4 unique routes. Now if I have a column for region (say EU, APAC, LATAM, etc.) and if I select 1 region, let's say EU, so customer A who has 2 unique routes in EU, should only show 2. But with this formula it still shows 4.
Can you help here please.