Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

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

Tags (2)
3 Replies

Re: Count distinct combinations of two fields

Maybe like this:

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

MVP
MVP

Re: Count distinct combinations of two fields

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

morganaaron
Valued Contributor

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!

Community Browser