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
Jaweed
Helper III
Helper III

Distinct Count

Hi experts

 

I am new at PBi and need to extract an aggregate value from my file. I want to know the distinct count of companies which have invoices <=30 days as per table below.

 

 

Company         InvoiceNo         AmountDue <=30days         AmountDue>30days

AAA                   001                   500

AAA                   002                   350

AAA                   003                                                                  225

BBB                    004                                                                  100

CCC                   005                   200

DDD                  006                   100

 

I have 4 invoices which I have been able to extract. Can you help me to get the no of DISTINCT companies. In this case 3 - (AAA CCC and DDD)

 

Thanks

2 ACCEPTED SOLUTIONS
yelsherif
Resolver IV
Resolver IV

You can create a measure as follows:

TheMeasure = CALCULATE(DISTINCTCOUNT(Table1[Company]),Table1[AmountDue <= 30days]>0)

View solution in original post

I hope it worked for you, please accept the suggested measure as a solution

View solution in original post

4 REPLIES 4
yelsherif
Resolver IV
Resolver IV

You can create a measure as follows:

TheMeasure = CALCULATE(DISTINCTCOUNT(Table1[Company]),Table1[AmountDue <= 30days]>0)

Thank you very much.It works perfectly!

Thank you. Let me try.

I hope it worked for you, please accept the suggested measure as a solution

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.