Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Adding total count on bar chart
paulh
I would like to add a count of the total figures displayed in a bar chart.
For example each bar displays a count per day
Mon - 3
Tues- 2
Wed -7
Thur - 3
Fri - 4
For a total count: 19 <--this number is what I want
Preferably I'd like it in the heading on near the top. Is there a good way of doing this in Birt. I'm using v3.4.2 btw.
Thanks in advance for any help.
Find more posts tagged with
Comments
mwilliams
Are you using SQL? You could determine the total in a second select statement and union the result to your original result and then you'd have the total in your series to display in the chart.
paulh
I am using SQL. While I think I would be able to calculate the total with SQL, I don't understand how to make the total appear simply as a number in the title (ex. Sample Report with X<span style='font-size: 10px;'>(ex.19)</span> Values), opposed to it's own bar graphic.<br />
Thanks for the help
mwilliams
Oh, sorry, I think I read your post the wrong way. You don't want a bar of the total, you just want the total displayed in the title of the chart or something? If so, if you can find this total outside of the chart, you can store the value in a persistentGlobalVariable and access this value in your chart and replace the title with whatever you want including this variable's value. Let me know.
paulh
That's exactly what I'm looking for. Any tips on doing it - I'm not the best at Birt at the moment
mwilliams
What's your BIRT version, I'll make a quick example.
paulh
Sure I'm using v 3.4.2.
Thanks
mwilliams
Take a look at this report.
paulh
hmm, I keep getting an error message that says this report contains errors. Though I do understand what you're doing now. However there is no Computed Columns in the Edit Data Set, for the data set I'm using. Would I get the same results using the binding under property editor for the chart, so I could use that instead?
mwilliams
Hmm. I don't get that error. Either way, the computed column is irrelevant. The PGV is what I was really trying to show.
paulh
Ok I see what you were saying now. There's one thing left confusing me.
I am using the same SQL statement to form my data set that I'm using to make 2 separate graphs. Each graph has a different x axis value and filter condition. How would I be able to make 2 unique RowCounts that corresponds to each individual requirements? Could I make a computed column in each graph's data binding and then use that?
mwilliams
I'm not sure that you can access the bindings in the title. One thing you could do would be to add another computed column and filter the aggregations the same as you do with your two charts.
paulh
Just wanted to say thanks for the assistance. I was able to solve it by moving the chart into a table detail and then use an aggregation function to get the total and apply the parameters. The result wasn't in the title but was immediately above, which was good enough.
Thanks again for the time
mwilliams
Not a problem. Let us know whenever you have questions!