8 Replies Latest reply: Apr 23, 2014 1:14 PM by Tim Kendrick

# Sum values of each segment in bar chart

Attached is a chart where values (Count of segment * Score for that segment) are displayed within each segment of the chart. However, is there a way to get the total of all segment values at the end of the bar?

• ###### Re: Sum values of each segment in bar chart

I only have QlikView PE.

The bar size is determined by:

Count({\$<[Question Number] = {'5'}>} DISTINCT [Respondent ID])

The data values are determined by:

SUM({\$<[Question Number] = {'5'}>} [Answer Value]) * Count({\$<[Question Number] = {'5'}>} DISTINCT [Respondent ID])

• ###### Re: Sum values of each segment in bar chart

SUM({\$<[Question Number] = {'7'}>} total <[Question Text]> [Answer Value])

Bolded is the crucial part of this calculation that allows for the calculation of the total of all segments.

• ###### Re: Sum values of each segment in bar chart

I need data also. Without I can't work on your file...

even though you have PE, once will found solution, will give your expressions.

• ###### Re: Sum values of each segment in bar chart

You can achive this by creating a second expression which creates the total. Follow the below steps.

1. Create a second expression using AGGR function. If you have 2 dimension in yor graph year and month then the expression would read as 'aggr(sum(Actuals),Month)

2. Enable the 'Value of data point' property for this expression.

Hope these steps help?

• ###### Re: Sum values of each segment in bar chart

Not effective, the AGGR function does not seem to be helpful in this case

• ###### Re: Sum values of each segment in bar chart

It is working for the sample dashboard that I have created.

I should be able to help if you post your sample QVW,...