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
Paulyeo11
Impactful Individual
Impactful Individual

How to create a measure for count each sales group have how many distinct customer ?

Hi All

 

my PBI file :-

 

Paulyeo11_0-1605624228729.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Paulyeo11 , Distinctcount(Table[Customer]) , not working ?

View solution in original post

8 REPLIES 8
vivran22
Community Champion
Community Champion

Hey @Paulyeo11 

 

The issue is not clear from your description. Please share a sample data file/pbix file along with expected solution for quicker resolution.

 

Cheers!
Vivek

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Paulyeo11
Impactful Individual
Impactful Individual

@Paulyeo11 

Please see the attachment





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Paulyeo11
Impactful Individual
Impactful Individual

Hi Ryan

Thank you for sharing.

From below image you can notice that G2 have 2 company.

Paulyeo11_0-1605698926740.png

But your expression only return 1.

Paulyeo11_1-1605698982430.png

 

Hi @Paulyeo11 ,

 

Try to create a measure like this:

COUNT_ = IF(ISBLANK([Sales LYTD]),BLANK(),DISTINCTCOUNT(SALES[COMPANY]))

V-lianl-msft_0-1606209611305.png

 

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

 

Hi V Linl

 
By the amit have provide me the below expression , look like your expression is more complicated , i have test with it , and i get the same result. So may i know what are purpose of those extra code ?
 
COUNT = Distinctcount(SALES[COMPANY])
 
Paul
 
jaideepnema
Solution Sage
Solution Sage

@Paulyeo11 I am not clear with your question..what exactly you want to count ?

amitchandak
Super User
Super User

@Paulyeo11 , Distinctcount(Table[Customer]) , not working ?

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.