Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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

3 Replies
robert_mika
Master III
Master III

Maybe like this:

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

maxgro
MVP
MVP

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

morganaaron
Specialist
Specialist

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!