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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

How to show data values in % in a Bar chart

Requirement : I am showing a KPI value in % , let's just say i have two values 'Yes' and 'No' and I am showing the % of 'Yes' as my KPI. Now the user wants to see reasons for 'No' records which i have got in the source data and am showing it in a bar chart. But the user doesn't want it in numbers rather in % but it shouldn't be relative but should be based on the total 'Yes' and 'No' records. Let's take a simple example

No. of 'Yes' records = 90

No. of 'No' records = 10

KPI % = 90

Now in the bar chart i have for example 3 reasons as 

R1 - 3

R2 - 3,

R3 - 4

Now if i take relative % then obviously i'll get 30%, 30% and 40% which is not what i want to show, what i have to show is this

R1/Count(Yes,No) = 3% , R2/Count(Yes,No) = 3% and R3/Count(Yes,No) = 4% 

So that KPI % + Reasons % sums up to 100%

Hope i have made the requirement clear. Please suggest any solution as this needs to be implemented asap.

Thanks for help !

Pranav

Labels (1)
1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

It looks like you already have the solution.  Is there something in the data model that prevents you from count(reason)/count(total yes/no)?

View solution in original post

2 Replies
jwjackso
Specialist III
Specialist III

It looks like you already have the solution.  Is there something in the data model that prevents you from count(reason)/count(total yes/no)?

pranaview
Creator III
Creator III
Author

Thanks for your response!

I actually tried TOTAL before but it didn't work because i messed up the set expression ('yes' and 'no' example that i gave was just to simplify the requirement really 🙂 but after your response i went again i corrected and now getting what i required.

Again thanks you!