Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to know what percentage of the total inhabitants of a certain city call or email me.
I have the dimension "contact_id" wich can phone or email.
For example, for city x
I get 150 phonecalls and 100 emails.
the total population is another field in my database, for city x it is 6000
So I want to divide 150 and 100 by 6000.
I have:
count(distinct contact_id)/count(distict inhabitant_id)
Qlikview makes the distiction of the dimension,
so 'count(distinct contact_id) ' represents 150 and 100
But the problem is that is also seperates the total inhabitants.
The total field is correct
I added an excel file to illustrate what I mean.
Hi,
I think that's what you're looking for:
count(distinct contact_id)/count( TOTAL distict inhabitant_id)
Cheers!
Hi
Not sure what the problem is. The expression looks correct if you are using it in a chart or a table with the city as a dimension.
Jonathan
Hi,
I think that's what you're looking for:
count(distinct contact_id)/count( TOTAL distict inhabitant_id)
Cheers!
That is what I was looking for.
Thank you!