3 Replies Latest reply: Jan 26, 2015 6:56 AM by Aaron Morgan

# Count distinct combinations of two fields

Hello,

I would like to calculate a simple Count of distinct combinations of two fields.

The two fields are %Product and %Depot. To count the unique combinations of %Product and %Depot, do I need something like the following?

=Aggr(Count(Distinct %Product),%Depot)

Not sure if I'm on the right track...the equation will just be used in a straight table.

Thanks!

Mel

• ###### Re: Count distinct combinations of two fields

Maybe like this:

=Count(Distinct( %Product))+Count(Distinct(%Depot))

• ###### Re: Count distinct combinations of two fields

count(distinct %Product & '|' & %Depot)

• ###### Re: Count distinct combinations of two fields

What dimensions do you want in your straight table?

You could just try using Count(Distinct %Product & %Depot) which would count the distinct combinations available.

Otherwise if you just want the figure, create a straight table with %Product and %Depot as your dimensions and just shove a count in there!