Discussion Board for collaboration related to QlikView App Development.
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.
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.
I think that's what you're looking for:
count(distinct contact_id)/count( TOTAL distict inhabitant_id)
View solution in original post
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.
That is what I was looking for.