# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Contributor

## Sum of specific rows in a Straight Table chart

Hi,

I am trying find a way to get Sum of specific rows in a Starlight table Chart.

here is my expression in the straight table

i cannot  use simple sum or aggr because the chart has Pick function which produces different result set for each dimension in a row.

I have 7 rows. I am trying to get the totals in the last row. Some thing like sum(row(1)+row(2)+row(5)+row(7)) from column 1

and same thing for column 2

Here is an example set

 Cost Element Value Percent Percent 2 Percent 3 Percent 4 ROW 1 374709.46 0.5154 0.5154 9.0993 8.2969 ROW 2 936834.91 1.2887 1.2886 22.7496 20.7437 ROW 3 521131.92 0.7168 0.7168 12.6549 11.5390 ROW 4 0 0.0000 0.0000 0.0000 0.0000 ROW 5 1457966.83 0.0000 0.0000 0.0000 0.0000 ROW 6 416083.05 0.5723 0.5723 10.1039 9.2130 ROW 7 270109.78 0.3715 0.3715 6.5592 5.9808 ROW 8 0 0.0000 0.0000 0.0000 0.0000 Total 2518869.12 3.464816685 3.4647004 61.16692897 55.77349614
Tags (1)
1 Solution

Accepted Solutions
Contributor

## Re: Sum of specific rows in a Straight Table chart

Hi

I found the solution as below

Above((Column(1)), 8)+ Above((Column(1)), 7)+Above((Column(1)), 6) + Above((Column(1)), 3)+ Above((Column(1)), 2) + Above((Column(1)), 1)

In the expression i am excluding row 4 and 5.

Thanks for everyone inputs and time

8 Replies
Esteemed Contributor III

## Re: Sum of specific rows in a Straight Table chart

Can you share some sample data with expected output to work on?

Contributor

## Re: Sum of specific rows in a Straight Table chart

HI I have added example set so the Total is sum of each column excluding Row 5

Esteemed Contributor III

## Re: Sum of specific rows in a Straight Table chart

What are the values in your CostElement field are they same as mentioned above in your example set ?

Contributor

Yes

MVP

## Re: Sum of specific rows in a Straight Table chart

Why not with set analysis in front end. Can you try this

Sum({<[Cost Element] -= {'ROW 5'}>} value)

Not applicable

## Re: Sum of specific rows in a Straight Table chart

Hi,

Is the attached any good/useful? Here is the screenshot just in case

Contributor

## Re: Sum of specific rows in a Straight Table chart

hi,

Like i mentioned my dimension is loaded from a inline table. it is not associated with any tables.

EG:

Pick(Match(_Dimension,'Row1','Row2','Row3','Row4','Row5',

'Row6','Row7','Row8') ,

expresion1,

expresion2,

expresion3,

expresion4,

expresion5,

expresion6,

expresion1+expresion2+expresion3+expresion5 ---i want some thing like this for Row 7

)

Contributor

## Re: Sum of specific rows in a Straight Table chart

Hi

I found the solution as below

Above((Column(1)), 8)+ Above((Column(1)), 7)+Above((Column(1)), 6) + Above((Column(1)), 3)+ Above((Column(1)), 2) + Above((Column(1)), 1)

In the expression i am excluding row 4 and 5.

Thanks for everyone inputs and time