Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jgarciaf106
Creator
Creator

How to obtain a percentage?

I am trying to get a percentage on a Qlik sense chart, but no matter what I do the percentage goes to 100%, I know the expression is correct as I tested in a different chart and it worked, Is theres an specific expression I could use to obtain a percentage out count expressions?

7 Replies
its_anandrjs

Can you provide sample for this.

hemeshreddy
Partner - Contributor III
Partner - Contributor III

In the number format select number

and below to that select %

rubenmarin

Hi, maybe the dimensions of this chart are different and the result is 100% in all.


What dimensions and expressions are you using?... A sample that demonstrates the problem will be better.

vvvvvvizard
Partner - Specialist
Partner - Specialist

=Sum(Your metric)/

Sum(Total your metric)

dont forget the total keyword

jgarciaf106
Creator
Creator
Author

The dimension I am using :

=If(not Match(HC_Grade_category, 'Intern'), HC_Age_Category),  This is used to discard the value of Intern and show the rest.

The measure am using:

=count({$<HC_Worker_Type={'Employee'},HC_Age_Category={'below 30'}>} HC_Age_Category)/count({$<HC_Worker_Type={'Employee'}>} HC_Age_Category)

rubenmarin

Hi Andres, I would try to split the expression in two expression:

- count({$<HC_Worker_Type={'Employee'},HC_Age_Category={'below 30'}>} HC_Age_Category)

- count({$<HC_Worker_Type={'Employee'}>} HC_Age_Category)


Then you can check if you are getting the expected values, if now you are getting 100% in all cells then it should be the same value in both expressions.


You can also add HC_Worker_Type and HC_Age_Category as dimensions to trace the results.

jgarciaf106
Creator
Creator
Author

Thanks @ Ruben Marin,

I fix it by count( Total:   "count(total{$<HC_Worker_Type={'Employee'}>} HC_Age_Category)"