Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How to do a unique count per single item?

Dear all,

 

I am seeking for a solution to get a unique count for the following situation:

 

I have a customer table with main customer number and a an additional customer delivery number:

 

Main customer numberDelivery customer number
111123
111134
111145
222234
222245
333345

 

The final result should be a measure showing for the following main customer number the following output:

 

111 ---> unique count of 3 delivery customer numbers

222 ---> unique count of 2 delivery customer numbers

333---> unique count of 1 delivery customer number

 

Any suggestion is welcome how to fix it.

 

Thanks!

  • Hi Anonymous ,

    I think you can use simply the measure COUNTROWS('Table') and put it in matrix with the Main Customer Number column in the row.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

15 Replies

  • Hi Anonymous ,

    I think you can use simply the measure COUNTROWS('Table') and put it in matrix with the Main Customer Number column in the row.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      It works!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, but it still returns the total number of all rows back to each main customer number. Maybe I do something wrong.

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

        Hi Anonymous ,

        can you send me a screenshot of your wrong result?