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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
EvanBarrick
Creator
Creator

Bar Chart Percentages

I have a bar chart with a dimension of 'Category'

the Measure is 'Conversions'

I am attempting to create a horizontal bar chart, on which i want each 'Category' to display it's percentage of 'Conversions' 

 

For example, there a total of 400 'Conversions' and the 'Category' direct represents 100 'Conversions' so I would want that to display as 25%

1 Solution

Accepted Solutions
skamath1
Creator III
Creator III

Try   Sum(Conversion)/Sum(Total Conversion) . Format the number as percentage.

View solution in original post

6 Replies
skamath1
Creator III
Creator III

Try   Sum(Conversion)/Sum(Total Conversion) . Format the number as percentage.

lblumenfeld
Partner Ambassador
Partner Ambassador

See the attached example. I used

Sum(Conversions) / Sum(total Conversions)

and formatted the number as a percentage  #,##0.0%

 

EvanBarrick
Creator
Creator
Author

When I use this, the percentages do not end in the output I would expect.

 

Here is my actual data:

Category                   Conversion

Web                             307

Referral                      45

ESAB1                         16

ESAB2                         19

RG1                               1

RG2                               0

RG3                               0

TW                                  1

Direct                           0

 

So the total is 389. The percentage for the first category should be 79% but when I am getting 30%

 

skamath1
Creator III
Creator III

Use the Sum function. It works 

 

d563425b73ab47d2889fd9a7aecfc997.png

lblumenfeld
Partner Ambassador
Partner Ambassador

Are you sure you're using the formula I used? That should work, unless your chart has additional dimensions. Is it just Category as the dimension?

EvanBarrick
Creator
Creator
Author

Problem was with my data, this functions. 

 

My data file has a totals row that I was unaware of