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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
slacayo
Contributor III
Contributor III

Get the percentage of a count from a table where column is categorical

I have a table on my dashboard which contains the count of times it appears in the entire table 

page click %
page1 2  
page2 1  
page3 5  
page4 7  

 

I want to calculate the percentage based off the total amount of pages in my table. I am able to get the click column by simply doing `count(page)` on my click column, but I am having a hard time getting the percentage. This would be each click value for everypage divided by total clicks. 

 

My logic says count(page)/sum(count(page)) but i am getting a aggregate nesting error

Labels (1)
2 Solutions

Accepted Solutions
stevejoyce
Specialist II
Specialist II

Try this:

count(clicks)/count(total clicks)

View solution in original post

slacayo
Contributor III
Contributor III
Author

I made a mistake when writing the question, its actually count(pages) which is not a numeric type 😞 so i dont think that will work . i just made an edit 

View solution in original post

4 Replies
stevejoyce
Specialist II
Specialist II

Try this:

count(clicks)/count(total clicks)

slacayo
Contributor III
Contributor III
Author

I made a mistake when writing the question, its actually count(pages) which is not a numeric type 😞 so i dont think that will work . i just made an edit 

stevejoyce
Specialist II
Specialist II

count(total pages) would work also as denominator, doesn't need to be numeric.

slacayo
Contributor III
Contributor III
Author

it worked! thanks