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: 
stighy
Contributor
Contributor

How to distinct count ?

I've a table like this : 

Year; Patient; City; Visit; Revenue

And some data like: 

2021; Mike; NYC; ABC; 100
2021; Mike; NYC; CDE; 50
2021; John; NYC; FZX; 40
2021; John; NYC; AGA; 10
2021; Frank; Los Angeles; JJK; 20

I want to show a table with: 
City; Nr Distinct Patient; Total Revenue

So
NYC; 2; 200
Los Angeles; 1;20

I don't know how to distinct count Patient. 
Using: COUNT(Distinct Patient) not work!!!


Thanks

Labels (1)
1 Reply
Lisa_P
Employee
Employee

This works in table in sheet, are you trying to do this in the load script ?

Lisa_P_0-1678663264478.png