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: 
npadilla73
Contributor III
Contributor III

Count(Distinct)

Hi Community,

I know it is a silly question, but I have no idea how to resolve this sintaxis with the function DISTINCT, I want DISTINCT two dimentions, after that, use COUNT expression, but when a try to use the next sentence,

= COUNT( DISTINCT (INVOICEACCOUNT, DELIVERYBRANCHID))

The system display an expression error.

Can anyone to help me .

Thanks

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

Try:


COUNT( DISTINCT INVOICEACCOUNT,&'-'&DELIVERYBRANCHID)


or



=Sum(Aggr( Count(Distinct DELIVERYBRANCHID),INVOICEACCOUNT,DELIVERYBRANCHID))


Feeling Qlikngry?

How To /Missing Manual(18 articles)

View solution in original post

2 Replies
robert_mika
Master III
Master III

Try:


COUNT( DISTINCT INVOICEACCOUNT,&'-'&DELIVERYBRANCHID)


or



=Sum(Aggr( Count(Distinct DELIVERYBRANCHID),INVOICEACCOUNT,DELIVERYBRANCHID))


Feeling Qlikngry?

How To /Missing Manual(18 articles)

npadilla73
Contributor III
Contributor III
Author

Thanks, second sentence works