4 Replies Latest reply: Apr 28, 2015 5:58 AM by Nandha Kumar

# 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).

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.

• ###### Re: Show two data points on bar chart

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

• ###### Re: Show two data points on bar chart

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

• ###### Re: Show two data points on bar chart

Try this.

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

Regards,

Nandha

• ###### Re: Show two data points on bar chart

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