Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
gouthamkk
Creator
Creator

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

Can some one please advise.?

Here is an example set

      

Cost ElementValuePercentPercent 2Percent 3 Percent 4
ROW 1374709.460.51540.51549.09938.2969
ROW 2936834.911.28871.288622.749620.7437
ROW 3521131.920.71680.716812.654911.5390
ROW 400.00000.00000.00000.0000
ROW 51457966.830.00000.00000.00000.0000
ROW 6416083.050.57230.572310.10399.2130
ROW 7270109.780.37150.37156.55925.9808
ROW 800.00000.00000.00000.0000
Total2518869.123.4648166853.464700461.1669289755.77349614
1 Solution

Accepted Solutions
gouthamkk
Creator
Creator
Author

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

View solution in original post

8 Replies
vishsaggi
Champion III
Champion III

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

gouthamkk
Creator
Creator
Author

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

vishsaggi
Champion III
Champion III

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

gouthamkk
Creator
Creator
Author

Yes

Anil_Babu_Samineni

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

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable

Hi,

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

qvw screenshot.GIF

gouthamkk
Creator
Creator
Author

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

)

gouthamkk
Creator
Creator
Author

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