Forum Discussion

sea's avatar
sea
Frequent Visitor
9 years ago
Solved

COUNT distinct value

Hello,

 

I have this tabl:

+----------------+--------+
| CUSTOMER |  TYPE |
+----------------+--------+
|   custom_   1 |     A    |
|   custom_   2 |     B    |  
|   custom_   1 |     A    |  
|   custom_   1 |     A    |  
|   custom_   2 |     B    |  
|   custom_   3 |     A    |  
|   custom_   4 |     B    |
+----------------+--------+

What formula can I do to measure how many distinct A-values are and how many different B-values are?

 

count A (custom_1, custom_3) = 2

count B (custom_2, custom_4) = 2

 

Thank you!

  • Anonymous's avatar
    Anonymous
    9 years ago

    sea,

    Directly create a table visual as follows, and you will get the count value.


    Of you can create a measure using DAX below.

    Measure = DISTINCTCOUNT(Table[CUSTOMER])




    Regards,
    Lydia

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    sea,

    Directly create a table visual as follows, and you will get the count value.


    Of you can create a measure using DAX below.

    Measure = DISTINCTCOUNT(Table[CUSTOMER])




    Regards,
    Lydia

    • JoostV78's avatar
      JoostV78
      New Member

      Hi, i'm quite new, so sorry if i'll ask somethink that is quite simple.

       

      i have this data:

       

      And i would like to have in one graph the count of all the -1, 0, 1 and 2 (the distinct valeu's) for every column. what is the best way to do so.