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)
How to use group and detail header for tables
BR12
Hello everyone,
I am using BIRT Report Designer 3.7.1 and I don?t know how to handle the group and detail header of the table to receive the outcome I need.
My data set includes three columns "customer group", "expenses" and "orders". I would like to receive the customer groups as column headings (for each group one column) and the expression "expensesSum/ordersSum" as row (the table could include as well the rows "expensesSum" and "ordersSum"). I built this expression by using aggregates.
What I am doing: creating a grouping parameter for customer group and then grouping the expression ?expensesSum/ordersSum? with this parameter (dropping all the data in the header row). The report preview then shows the correct values but each customer group in another row and I would prefer to receive each customer group in another column.
How does this work? Any help is highly appreciated!
Thank you already in advance for taking the time,
BR
Find more posts tagged with
Comments
mwilliams
Sounds to me like you're talking more about a crosstab.
BR12
Hello Michael,
thank you a lot for your reply.
I tried to use the cross tab function, but could not get much further.
The two problems I am facing:
I have a calculated data set (?average expenses per order? defined as SUM expenses / SUM orders) as data for defining the rows. And I need the data heading (?average expenses per order?) to be shown in the report as value for the row and not the calculated values. I also receive an error message when I am adding a column that only has as value "average expenses per order".
Moreover, I don?t want to additionally summarize the fields (that should be dropped in the field for data to be summarized) but only receive the expression SUM expenses / SUM orders aggregated per customer group (which I drop as data to define the columns).
Probably my approach is all wrong but I am lost in finding another approach. Therefore any hint or further advice would be of great help to me!
Thank you already a lot in advance!
BR
mwilliams
There are different aggregations you can use in a crosstab, like "FIRST", that will take your value straight from your dataSet and not do any computations. Maybe I'm just misunderstanding something. Can you show me a few lines of your dataSet data and what you want it to look like in your report? Then, I'll give it a try using your small sample of data. Thanks!
BR12
Hello Michael,
many thanks for taking the time to help me with my problem!
I get the feeling that the implementation in BIRT should be rather easy but somehow I still could not succeed.
The only thing missing for the outcome I need is now that the grouping is not yet working, as I receive the same value for each column. You can find a really small sample attached. Hope this helps to make clear what I am aiming at.
Many thanks again!!
BR
mwilliams
Can you include in your example the expected result, as well? Thanks.
BR12
Yes, sure.
I updated the excel sample by showing how the result should be calculated (as pivot or only by using a formular). It is a really easy task but I am just not getting the correct results with the cross tab function. Sorry for taking so much of your time for this problem of mine.
And of course many thanks again.
Best regards
mwilliams
Take a look. Be sure to change the location of the flat file in the dataSource to the directory where you save the .txt file.
BR12
Thanks a lot for the file and once more for taking the time!
mwilliams
You're very welcome! Let us know whenever you have questions!