DISTINCTCOUNT with two separate filters that overlap

btreg

New Member
Joined
Feb 29, 2016
Messages
30
I am trying to do a DISTINCTCOUNT of client reference numbers in a table, but I want to combine the results of two separate filters (to be applied on an "Or" basis).

Here are the two separate MEASURES:

=CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[SurplusDeficit]>50)
=CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[DebtBalance]>20000)

I would like a single DISTINCTCOUNT measure that combines the two above on an "Or" basis, is that makes sense!

Many thanks in advance for any help.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Maybe something like this:
=CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[SurplusDeficit]>50)+CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[DebtBalance]>20000)-CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[SurplusDeficit]>50,'Table1'[DebtBalance]>20000)
 
Upvote 0
Maybe something like this:
=CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[SurplusDeficit]>50)+CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[DebtBalance]>20000)-CALCULATE(DISTINCTCOUNT(Table1[PulseReferenceNumber]),'Table1'[SurplusDeficit]>50,'Table1'[DebtBalance]>20000)
Hi mart37, that looks like one way around it - much appreciated, thank you!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top