Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Show data from chart in table
h3llraid3r
Hi there,
i've got a little problem using BIRT for the first time...
I'm using data from a *.csv-file which is constructed in that way:
name1,value1,time
name2,value2,time
name3,value3,time
I got this data in a chart, showing time on the x-axis, the value on the y-axis and grouping on the first column with names. Works perfect.
But i need a table in the following layout and don't know how to get it work:
name1 name2 AVG
value1 value1 average(row)
value2 value2 average(row)
...
Can anyone of you help me to do this?
Greets, h3llraid3r
Find more posts tagged with
Comments
mwilliams
Hi h3llraid3r,
You shouldn't need to pull the data from the chart for this. You should just be able to add a computed column in your dataSet that computes the row average and then drag your dataSet into the report design from the data explorer to make a table out of it. Another thing you could do would be to add the dataSet as is to the design in a tabl and then add a column to the right and create your binding there by dropping a data element into the new column. Hope this helps. Let me know if you have questions.
h3llraid3r
thanks for your answer,
the problem i have:
The first column (name1, name2,...) must be "devided" into two (or more) columns as description, showing only the values that belong to these values.
A short example to make it more clearly:
initial:
name1,2,12:00
name1,4,13:00
name1,3,14:00
name2,10,12:00
name2,2,13:00
name2,3,14:00
result:
name1 name2 AVG
12:00 2 10 6
13:00 4 2 3
14:00 3 3 3
.
.
.
AVG 3 5 4
I tried a lot with computing columns, but it never showed what i needed.
At last, i tried with an cross tab with column1 as the top data field (description), column3 as data field on the left. Works so far.
So i put column2 as the data field to be summarized, but i get the wrong values. birt just displays the highest value from the two columns:
name1 name2
12:00 10 10
13:00 4 4
14:00 3 3
Any ideas how to get that work?
mwilliams
What is your BIRT version? I'll use your data to make a quick example. Will you only have Name1 and Name2 to average? Or will there be more names? Let me know. Thanks.
h3llraid3r
Hi,
thanks for your effort, I solved the problem while playing around a little bit with the table functions
How did it work?
First I created an data cube with column one and three as a group and column two as summary field.
Then I created an cross tab, inserted the first column at the top, the third column on the left and the summary field on the right. Works perfect.
To get the AVG's, I created grand totals (cross-tab -> properties->row/column area).
By now, I've got another problem:
My data is polled every 5 minutes, but I have to aggregate that to an interval of 1 hour. In the graph, this is easy to do by grouping on the x-Axis with an interval of 60 minutes.
But how can I accomplish that in my cross tab?
mwilliams
Is your "time" field of type time? Or is it just a string? If it's a date/time or time field, when you make the time a dimension in the crosstab, it should ask you what groupings you'd like to include. If it's a string field, you could create a computed column that figures the hour or you could make the string into an actual date and it should work as I said above.
Hope this helps.
h3llraid3r
At the moment, it's a string field, but it's no problem to convert it to an date field.
I'll try your suggestion as soon as possible
h3llraid3r
Thanks a lot, i just remembered that in a wrong way, however, it was a string field...
Ater changing that to time field, i got the option to group on time, selecting either hour,minute or second.
Thanks a lot for helping me in this case :-)
mwilliams
Not a problem. Always glad to help. Let us know whenever you have questions!