Forum Discussion

android1's avatar
android1
Icon for Post Patron rankPost Patron
7 years ago
Solved

Count Distinct but only SUM different numbers

Hi,

 

I want to sum the number of distinct times a number in Visit Num column occurs.  In pic below for e.g 250884 occurs twice. I only want to count this once & display a total sum. Using distinct count which is what the second column is sums everything.

 

  • Are you using Table visual? If so, change it to Matrix visual.

     

    Put [Visit Num] into Row field. Add measure DISTINCTCOUNT([Visit Num]) as value field.

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    android1,

     

    Can you try create this measure:

    Count:= CALCULATE(COUNTROWS(Table))

    Then place them intable with the Visit Number:

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Let me know if this helps. Thanks.

    • android1's avatar
      android1
      Icon for Post Patron rankPost Patron

      Anonymous,

       

      Thanks. Not doing want I need unfortunately.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        android1,

         

         

        Did you add a calculated column or a measure?

         

        If you create a calculated column, you summarize the count as sum.

        If it is a measure, you will set "Don't summarize" for the Visit Number.

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

        Duc

  • Chihiro's avatar
    Chihiro
    Icon for Solution Sage rankSolution Sage

    Are you using Table visual? If so, change it to Matrix visual.

     

    Put [Visit Num] into Row field. Add measure DISTINCTCOUNT([Visit Num]) as value field.