COUNTAX with filter criteria and DISTINCTCOUNT

IinCircle

New Member
Joined
Jul 3, 2014
Messages
2
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]Store
[/TD]
[TD]Product
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Pear
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Pear
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]Apple
[/TD]
[/TR]
</tbody>[/TABLE]
Hi, I tried to have a formula combining COUNTAX and DISTINCTCOUNT but keeps getting an error message.

I want to count the number of Stores that sold Apple, which in this case is 3.
=CONTAX(FILTER(Table,[Product]="Apple",[Product])AND(DISTINCTCOUNT(Store))
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
That 2nd attempt looks good, if you fix up your syntax:

=CALCULATE(DISTINCTCOUNT(Table1[Store]), FILTER(Table1, Table1[Product] = "Apple"))
 
Upvote 0

Forum statistics

Threads
1,224,013
Messages
6,175,941
Members
452,688
Latest member
Cyb3r_Ang3l

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