cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jaweed Regular Visitor
Regular Visitor

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

Accepted Solutions
yelsherif Member
Member

Re: Distinct Count

You can create a measure as follows:

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

View solution in original post

yelsherif Member
Member

Re: Distinct Count

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

View solution in original post

4 REPLIES 4
yelsherif Member
Member

Re: Distinct Count

You can create a measure as follows:

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

View solution in original post

Jaweed Regular Visitor
Regular Visitor

Re: Distinct Count

Thank you. Let me try.

yelsherif Member
Member

Re: Distinct Count

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

View solution in original post

Jaweed Regular Visitor
Regular Visitor

Re: Distinct Count

Thank you very much.It works perfectly!

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)