Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

1 Solution

Accepted Solutions
sunny_talwar

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.

View solution in original post

13 Replies
sunny_talwar

What are your dimension?

Anonymous
Not applicable
Author

Hi Melba,

Try this plz.

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

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

Regards

sunny_talwar

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.

Anonymous
Not applicable
Author

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!

sunny_talwar

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

Anonymous
Not applicable
Author

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

Kushal_Chawda

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

Anonymous
Not applicable
Author

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

sunny_talwar

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