Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

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

1 Solution

Accepted Solutions
Not applicable

Re: Calculated Row on in Straight Table

Please find attacment....

10 Replies
Not applicable

Calculated Row on in Straight Table

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

Tab A:

Segment

from .....

concatenate load

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

Resident Tab A;

Regards,

Antony.

Not applicable

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

---------

Segment     Calles_Made<sum(calls)>

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

D0               56    

D1-D3          72

NCP            52

Now i Get

Segment     Calls_Made

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

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:

LOAD Geo_Calls_Data.GeoID,

     Geo_Calls_Data.Segment,

     Reach,

     calls

FROM

Geo_Calls_Data.qvd

(qvd);

concatenate load

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;

Not applicable

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?

Not applicable

Calculated Row on in Straight Table

pls share your application....

Not applicable

Re: Calculated Row on in Straight Table

Please find attacment....

Not applicable

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?

Not applicable

Re: Calculated Row on in Straight Table

i have attached one application on above, pls check.

Not applicable

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

Not applicable

Calculated Row on in Straight Table

Hello Antony,

Thanks a lot, works pretty well.

Regards,

Prateek