Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Distinct count does not work

Hello

 

I create a MEASURE = DISTINCTCOUNT(Table1[Col1]) and I display it in a card visual.

 

However, it does not show the number of the entries that appear in a filtered table visual that I have created. It displays the number of entries in the whole table.

 

How can I make it count only the displayed entries please?

 

Thanks!

4 Replies

  • az38's avatar
    az38
    Community Champion

    Anonymous 

    try CALCULATE()

    MEASURE = CALCULATE(DISTINCTCOUNT(Table1[Col1]))

    or even

    MEASURE = CALCULATE(DISTINCTCOUNT(Table1[Col1]), ALLSELECTED(Table1))
    • Anonymous's avatar
      Anonymous
      Not applicable

      az38 

       

      Unfortunately it does not work. It keeps showing the total distinct count in the table and not the distinct count of the rows shown in the table visual.

       

      Any idea?

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

        Appreciate your Kudos.

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Anonymous ,

     

    Could you please share your sample data and the expected result here if you don't have any Confidential Information? Please upload your files to OneDrive for Business and share the link here.