cancel
Showing results for 
Search instead for 
Did you mean: 

How to add aggregation on multiple objects in a single webi table?

Former Member
0 Kudos

Hi experts,

I recently face an requirement that show a report table in a specific format.

Let me show you in a simple example, let's say we have three dimensions and one measure. Product, Region, Quarter and Sales. When put these objects in an vertical table, it display data in this way.

Product RegionQuarter Sales
TVNorthQ137
TVNorthQ26
TVNorthQ34
TVNorthQ489
TVEastQ181
TVEastQ25
TVEastQ332
TVEastQ499
MobileNorthQ113
MobileNorthQ250
MobileNorthQ395
MobileNorthQ465
MobileEastQ158
MobileEastQ280
MobileEastQ376
MobileEastQ497

However, we expect to append some aggregation value in this table as this.

Product RegionQuarter Sales
TVNorthQ137
TVNorthQ26
TVNorthQ34
TVNorthQ489
TVEastQ181
TVEastQ25
TVEastQ332
TVEastQ499
MobileNorthQ113
MobileNorthQ250
MobileNorthQ395
MobileNorthQ465
MobileEastQ158
MobileEastQ280
MobileEastQ376
MobileEastQ497
TVAll regionQ1
TVAll regionQ2
TVAll regionQ3
TVAll regionQ4
MobileAll regionQ1
MobileAll regionQ2
MobileAll regionQ3
MobileAll regionQ4
All productNorthQ1
All productNorthQ2
All productNorthQ3
All productNorthQ4
All productEastQ1
All productEastQ2
All productEastQ3
All productEastQ4
All productAll regionQ1
All productAll regionQ2
All productAll regionQ3
All productAll regionQ4

As you see, we add "All region" and "All product" here, and combine them with real product, region and quarter value to show aggregations.

Can anyone tell me how to get such table in webi? Can we implement it simply in report level?

Best regards and thank you,

Ocean

Accepted Solutions (1)

Accepted Solutions (1)

sateesh_kumar1
Active Contributor
0 Kudos

Hi Ocean,

To get your requirement exactly,we need to add too many  footer cells with predefined formulas (As of now you have TV and Mobile only as products , guess in future you can have so many) in the table.

It is better to use Outline functionality(fold/unfold) with breaks applied on Region and Quarter.

Remove all break headers.

use=sum([Sales]) in footer cells.

You'll get below format in the table.

use can expand/collapse when needed.

Or

Have a table with all data (first part)

have a tables with summarized data .One for Product/Quarter specific , one for region/Quarter specific ... and arrange them as they look like single table.

Former Member
0 Kudos

Thanks Sathish!

Can report footer solve the problem? Can you show me an example?

I am wondering can the problem be solved in a single table.

Former Member
0 Kudos

Yes, keep adding rows to the table footer for all the rows that you want. Unfortunately you're heading down the hard-coding route in terms of row labels, but it's certainly achievable in a single table.

sateesh_kumar1
Active Contributor
0 Kudos

To get the format in a table ,you need to add 20 footer cells and need to write 20 formulas with where conditions.

Ex: =Sum([Sales] Where ([Product]="TV" And [Quarter]="Q1"))

TV ,All Region,Q1 is hard coded.

Answers (4)

Answers (4)

former_member210032
Active Participant
0 Kudos

Hi Yang,

This link will help you

http://www.perpendulum.com/2011/12/hierarchy-in-one-column/

Regards

Mustafa

Former Member
0 Kudos

Actually, this question is more focus on the report structure. I know the calculation context. In my first thought, I create the report similar with above one. The problem is in that case, there are a lot of duplicate rows. If you don't know what I am talking about, you can just take a little try in a real webi report sample.

The key of the question is about how to put the aggregated "All product", "All region" rows in the right place with right frequency and in a single table. As I said, it is more about the format/structure problem.

Any thought?

Former Member
0 Kudos

If you need this in a single table, you have to go with the report footer and add multiple rows.

Former Member
0 Kudos

One way is to get the "All product" and "All region" in the LOVs for product and region.

Or create another table and align this table by setting the relative position just below the first table.

You can use =[Sales] ForAll([region]) for showing Sales for "All region" for a product and Quarter similarly,

= [Sales] ForAll([product]) for displaying "All products" sales data.

Let me know if this helps.

Former Member
0 Kudos

Thanks Charuta!

So do you mean there is no way to create a single table in that format?

Former Member
0 Kudos

If it suits, go for the second table and set the relative position, it will avoid creating multiple static rows in the footer.

Former Member
0 Kudos

You need to use calculation contexts, such as ForEach, ForAll, In and Where.

It's probably easier to go through the user guide to pull out specific examples that would suit your needs.