Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sea
Frequent Visitor

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!

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@sea,

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

Of you can create a measure using DAX below.

Measure = DISTINCTCOUNT(Table[CUSTOMER])
2.JPG



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@sea,

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

Of you can create a measure using DAX below.

Measure = DISTINCTCOUNT(Table[CUSTOMER])
2.JPG



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

 

i have this data:

Capture.PNG

 

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.