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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count distinct by two fields

Hi,

I have a particular case. I need to get the number of tickets from a db that contains the detail of these. So, the first solution could be "Select distinct (Nume_docum) from Detalles", the trouble is because we have many locals son in sql I could use "Select distinct Codi_local, Nume_docum from Detalles".

Into qlikview i use this expression: "=count(distinct Nume_docum)" and i get the first case, How i do to make qlikview get the total by this fields?

I just want to add Codi_local into dimension at last resource.

Thanks in advance.

Santiago.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be this:

Count ( Distinct  Codi_local & Nume_docum)

View solution in original post

4 Replies
tresesco
MVP
MVP

May be this:

Count ( Distinct  Codi_local & Nume_docum)

Not applicable
Author

I'm not quite sure I understand what you're asking. But if what you're asking is how to do a distinct count of "Nume_docum" for a specific Codi_local without displaying Codi_local as a dimension, you can probably use set analysis.

E.g.count({<Code_local = {'some value'}>} distinct Nume_docum)

Not applicable
Author

Thanks for your response.

Regards,

Santiago.

Not applicable
Author

Thanks for you response, but on your way i get the total for every codi_local, what i needed was a total by 'combination'

Thanks again.

Santiago.