Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage value

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.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

I think that's what you're looking for:

count(distinct contact_id)/count( TOTAL distict inhabitant_id)

Cheers!

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi,

I think that's what you're looking for:

count(distinct contact_id)/count( TOTAL distict inhabitant_id)

Cheers!

Not applicable
Author

That is what I was looking for.

Thank you!