Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show two data points on bar chart

I have a bar chart that is calculating based on the sum of a field. I have the data values to show on the chart for the sum amount of 161,935 (see below).

4-23-2015 8-05-35 AM.png

However, I would like to show the COUNT as well, but only as a data point.  So, ideally, the label would read 161,935 / (COUNT).

I have done this by adding another expression for COUNT(value), but that just brings up another bar with the count of the field.

Is there a way to show the count value in conjunction with the sum value as a data point?

Thank you.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Travis,

Try a second expression in this way and select "value on data points" and unselect the rest of the display option.

= 161,935 &' ' & ' / ' &' ' & Count (field name).

Cheers,

Nandha

View solution in original post

4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You can add an expression that is not presented as a Bar (clear the Bar check box) and only shows Values on Data Points. For the value, use the Dual() function:

- the text part of the dual should calculate both values and concatenate them to form the desired look, such as SUM(COUNT)

- the numeric part of the dual should be the same as the bar expression, to ensure correct placement of the text.

The original expression in this case should not show Values on Data Points.

Make sure to format the Number for the second expression as "Expression Default"

cheers,

Oleg Troyansky

www.masterssummit.com - take your QlikView skills to the next level!

Anonymous
Not applicable
Author

Hi Travis,

Try a second expression in this way and select "value on data points" and unselect the rest of the display option.

= 161,935 &' ' & ' / ' &' ' & Count (field name).

Cheers,

Nandha

Not applicable
Author

Thank you for your response. I apologize for my delay.

I followed your instructions and tried the following dual function for one of the expressions:

dual(sum(VALUE) & count(VALUE),sum(VALUE))

but it looks like it just adds the sum and count together rather than giving me the sum/count as a data point.

Do you happen to have an example of how this may work?

Thank you

Anonymous
Not applicable
Author


Try this.

dual(sum(VALUE) &''&'/'& count(VALUE),sum(VALUE))

Regards,

Nandha