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

Creating a percentages bar graph

I am new to QlikView and need help making a simple bar graph.

I have a dataset with survey responses for every region we serve.  I need only one region and need the results to be a percentage (for only that specified region).  I created the graph with only one dimension (the question I am looking at) and created the expression, but the numbers are not right.

Any help is greatly appreciated:

Count(If(Region = 'Southeast',[Q25]))
/
Sum(If(Region = 'Southeast',[Q25]))

What am I doing wrong?

5 Replies
Anonymous
Not applicable
Author

Set Analysis is something you will need to learn to effectively use QlikView.

Count(${<Region = {'Southeast'}>} [Q25])

/

Sum(${<Region = {'Southeast'}>} [Q25])


It's basically saying always have Southeast selected in the Region listbox.

saurabh5
Creator II
Creator II

hi Karen,

if you are targeting only one region then probably your numerator  has to be only 'Southeast' divided by total set.

try something like this:

Count(${<Region = {'Southeast'}>} [Q25])

/

Count( [Q25])

then Change the number Format in your bar chart as ###.#0%. To get values in percentage.

Anonymous
Not applicable
Author

A wild guess here, as I don't really understand your scenario, but.................

What possible values does [Q25])have ?

If it is 0 and 1 then try an expression like :

     Sum([Q25])/ Count([Q25])

Use Region as your Dimension.  All going well you should now have a Bar Chart of all your regions.

If ok then create a List Box on Region and select 'Southeast'.

Not applicable
Author

Thank you, this Set Analysis thing is very useful.  I ended up using this with the denominator as a Count, Total.

buzzy996
Master II
Master II

u can simply use Michael.Gardner suggestion.