Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

distinct count total

Hi community, 

I would like to get an overview of the amount of distinct customers who buy a specific product within a specific period. 
The specific product and specific period are selected by a filter, which is ideally dynamic for the end user.

The table below has been used to generate the overview in the second screenshot. 

The problem here is that the overview seems to count all the customers and not only the customer who bought the specific product. As a result, the total row amount is way too high and constant over time. 

When removing the customer name I get this: 


I would like to get the sum of the visible values as a row total. In the last column of screenshot 2 that would mean 6.

I have looked at other forum posts, but could not find a solution there. 
How can I solve this? Can someone please help to steer me towards a solution?

Thanks

 

11 Replies

  • Anonymous are you using the measure to show the count? If yes what is the measure expression?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I do not think that it is a measure that I used. Should I do that? If so, how should it look like?

      I tried:
       
      Distinct count customer = DISTINCTCOUNT('Dim Customer'[CustomerName])


      but it did not give the results I was hoping for when I entered it into the matrix.

      See screenshot below. 



      Thanks for the support.

      parry2k 

       

      • parry2k's avatar
        parry2k
        Super User

        Anonymous we are over complicating everything, paste sample data and expected output otherwise we will keep in going in circles.

  • Anonymous , looking screenshot thing seems fine unless they are from two different tables which are NOT joined and you have taken a count distinct on the customer.

    • Anonymous's avatar
      Anonymous
      Not applicable

      They come from only one table, namely "Dim Customer". One of the variables is called CustomerName. I used in the rows and in the values (as a distinct count).