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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,216,765
Messages
6,132,594
Members
449,737
Latest member
naes

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