Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Not applicable

How can I show percentages in a bar chart? Every column sum 100%

I need to show the percentages in every column of a bar chart.

This is my expression:

COUNT({<SampleType={'Tender'}>}DISTINCT [Sampling Order Header ID])

Please help.

Tags (2)
1 Solution

Accepted Solutions

Re: How can I show percentages in a bar chart? Every column sum 100%

manucamon‌ - If this is what is needed, then why not choose relative on the expression tab? I feel that there are 2 dimensions and the OP wants 100% for each column where he might be stacking some bars based on the 2 dimension.

I would say may be something like this if my guess is true above

Count({<SampleType={'Tender'}>}DISTINCT [Sampling Order Header ID])

/Count(TOTAL <1stDimensionHere> {<SampleType={'Tender'}>}DISTINCT [Sampling Order Header ID])

Replace 1stDimensionHere with whatever 1st dimension you are using in the chart.

13 Replies

Re: How can I show percentages in a bar chart? Every column sum 100%

What are your dimension?

manucamon
Valued Contributor III

Re: How can I show percentages in a bar chart? Every column sum 100%

Hi Melba,

Try this plz.

COUNT({<SampleType={'Tender'}>}DISTINCT [Sampling Order Header ID])

/COUNT(TOTAL {<SampleType={'Tender'}>}DISTINCT [Sampling Order Header ID])

Regards

Re: How can I show percentages in a bar chart? Every column sum 100%

manucamon‌ - If this is what is needed, then why not choose relative on the expression tab? I feel that there are 2 dimensions and the OP wants 100% for each column where he might be stacking some bars based on the 2 dimension.

I would say may be something like this if my guess is true above

Count({<SampleType={'Tender'}>}DISTINCT [Sampling Order Header ID])

/Count(TOTAL <1stDimensionHere> {<SampleType={'Tender'}>}DISTINCT [Sampling Order Header ID])

Replace 1stDimensionHere with whatever 1st dimension you are using in the chart.

manucamon
Valued Contributor III

Re: How can I show percentages in a bar chart? Every column sum 100%

Hi Sunny T,

I don't know the dimensions that Melba has on the chart, If there is only one dimension, with Total is enough, if there are more dimnensions, Melba needs to use your answer.


Regards!

Re: How can I show percentages in a bar chart? Every column sum 100%

But how would adding a total give 100% for each column if there is only one dimension?

manucamon
Valued Contributor III

Re: How can I show percentages in a bar chart? Every column sum 100%

That is because we need to see the chart and examples to review it.

Re: How can I show percentages in a bar chart? Every column sum 100%

Agree with sunny. If there is only one dimension then, 100% for each column not possible. There should be two dimensions.

manucamon
Valued Contributor III

Re: How can I show percentages in a bar chart? Every column sum 100%

I understand that Melba is showing 100% actually, and needs real %.

Re: How can I show percentages in a bar chart? Every column sum 100%

I guess we need to wait and watch for OP's response before we discuss this any further