10 Replies Latest reply: Nov 22, 2011 5:00 AM by Antony Napolean

Calculated Row on in Straight Table

Hello All,

The problem i am facing is that i have a segment column which i am using as a dimension

the values to segment dimension is

Segment

-------------

D0

D1-D3

D4-D6

NCP

Now i need to show sum of some metric for each of these segments which is not a problem

I also need to show one more calculated row as ALL CP which is a summation of (D0,D1-D3,D4-D6)

So finally it should come out to be like

Segment

-------------

D0

D1-D3

D4-D6

All CP (Sum of D0, D1-D3,D4-D6)

NCP

• Calculated Row on in Straight Table

Pls try this..........

Tab A:

Segment

from .....

if(Segment='D0' or Segment='D1-D3'or Segment='D4-D6','All CP') as Segment

Resident Tab A;

Regards,

Antony.

• Calculated Row on in Straight Table

Thanks i could do that, however

the problem i am facing now is that the metric is not pre calculated so say

Earlier

---------

------------     -------------------

D0               56

D1-D3          72

NCP            52

Now i Get

-----------     ------------------

D0               56

D1-D3          72

All CP          0
NCP            52

How would i get to precalculates the sum of calls for All CP?

Geo_Calls:

Geo_Calls_Data.Segment,

Reach,

calls

FROM

Geo_Calls_Data.qvd

(qvd);

if(Geo_Calls_Data.Segment='D0' or Geo_Calls_Data.Segment='D1-D3'or Geo_Calls_Data.Segment='D4-D6','All CP') as Geo_Calls_Data.Segment

Resident Geo_Calls;

• Calculated Row on in Straight Table

sum(if(Geo_Calls_Data.Segment='D0' or Geo_Calls_Data.Segment='D1-D3'or Geo_Calls_Data.Segment='D4-D6',Reach)) as Reach

this does not seem to work

netiher does sum(reach) as a sub query in the if query

What else can i do?

• Calculated Row on in Straight Table

I so desperately wanted to.. but data behind is not sanitized and am not authorized to share it with the actual data.

A simple question...

So my table has

Segment     reach     Calls

-----------     -----------     ---------

D0             23          78

D1-D3          67          89

NCP               78          89

Now what i want as an output is

Segemnt     Reach     Calls

-----------     ------------     --------

D0          23               78

D1-D3     67               89

All CP     90              167

NCP          78               89

What i cant understand is why the aggregartion of the metric throwing an error? in the concatenate script?

If you want i can prepare mock data if it wud help?

• Re: Calculated Row on in Straight Table

i have attached one application on above, pls check.

• Calculated Row on in Straight Table

Thanks for the example , i ve got the idea shall just try and get back to you,

Thank you so much

Regards,

Prateek

• Calculated Row on in Straight Table

Hello Antony,

Thanks a lot, works pretty well.

Regards,

Prateek

• Re: Calculated Row on in Straight Table

Thanks ....

Regards,

Antony