12 Replies Latest reply: Feb 6, 2014 11:11 AM by luca luca

# value in the bar and sum on the bar

Hi all

I have this chart:

Is it possibile having the sum above every bar?

Luca

• ###### Re: value in the bar and sum on the bar

I do not think so since you have plot inside segments checked (can't have both), but you can put on axis by adding another expression and calculating the total that way, just check Text on Axis and Uncheck Bar chart:

Hope this helps!

• ###### Re: value in the bar and sum on the bar

Hi,

You can add an other expression like :

Column(1)+Colunm(2)+Column(3)+Colunm(4)

and on the Display Options panel

uncheck Bar and check Values on Data Points

Best,

Aurélien

• ###### Re: value in the bar and sum on the bar

Not in one chart, but you can get the totals below the bars. See attached example.

• ###### Re: value in the bar and sum on the bar

in my chart, X-dimension is

=Pick( Match (left( Text(QuarterName([Ingresso Contract Analysis])),1), 'g','a','l','o'), '1Q ','2Q ','3Q ','4Q ') & right(Text (QuarterName([Ingresso Contract Analysis])),2)

how can I use this in a expression like "count(total <Month> Sales)"  ?

luca

• ###### Re: value in the bar and sum on the bar

Well, you can't. The sane way out of this is to create the quarter field in the script and then use it as dimension in your chart instead of that calculated dimension you have now. You can simply reuse the expression of your calculated dimension in the script to create that quarter field in the same table you load the field [Ingresso Contract Analysis].

• ###### Re: value in the bar and sum on the bar

ok, thank you very much..

luca

• ###### Re: value in the bar and sum on the bar

If you want to put the values on the datapoint then

Right Click on graph--> Properties-->Expression-->Check field  Values on data point. It will display data above the graphs.

• ###### Re: value in the bar and sum on the bar

thanks.

how I write the expression? could you post an axample?

luca

• ###### Re: value in the bar and sum on the bar

The expression would be the total of each of the 4 segments for your bar. Just add them together or sum them up, depends on your expression(s) for getting those numbers. How are you calculating now?

Hope this helps!

• ###### Re: value in the bar and sum on the bar

Hi Gysbert.

I'm sorry but I need your help.

Please, take a look at my example. Why I can't replicate your chart? numbers on the axis are replicated, why?

grazie mille

luca

• ###### Re: Re: value in the bar and sum on the bar

Two reasons mainly. To begin with there's no [Applicable set of rules] with a record for every QuarterIngresso value. That can be fixed by adding some dummy records:

join(TAB_VIEW_CRR)

FieldValue('QuarterIngresso', recNo()) as QuarterIngresso,

'Ancillary services' as [Applicable set of rules]

AutoGenerate(FieldValueCount('QuarterIngresso'));

The next problem is that enabling the horizontal scrollbar creates a gap between the counts below the axis and the QuarterIngresso labels. I haven't found a way around this.

Also take a look at the expression for the text color of the second expression (click on the + in front of the expression and select Text Color). This makes sure that only one line of count values is shown as text on axis.

• ###### Re: value in the bar and sum on the bar

Gysbert,

thank you.

your solution is valid but due to the gap between the counts and the QuarterIngresso labels, and to the fact that seems impossibile even align the counts, this solution is not good for me.

I'm a beginner, I have a lot to learn..

ciao e grazie

luca