Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum value of X Colum based on Text of Y Colum

Hi,

I need a line graph to rep the sum of <2014> for the different <Port>

result should be as below.

I have tried Sum(2014) but it seems to skip a few rows

   

Ham= 1287
LCH = 91

   

Cont_ClassCO_Group_CodeTrade RoutePort2014
EMPTYNYKEFEHam0
EMPTYOOCLEFEHam7
LADENAPLEFEHam243
LADENHLCEFEHam487
LADENMOLEFEHam175
LADENNYKEFEHam278
LADENOOCLEFEHam8
EMPTYAPLIALCH9
EMPTYHLCIALCH0
EMPTYMOLIALCH0
EMPTYOOCLIALCH0
EMPTYAPLEFEHam0
EMPTYHLCEFEHam24
EMPTYMOLEFEHam2
LADENHMMEFEHam63
LADENAPLIALCH74
LADENHLCIALCH0
LADENMOLIALCH2
LADENOOCLIALCH6
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Dimension

Port

Expression

SUM([2014])

I got    Ham 1287

LCH 91... which seems to right to me... What's wrong?

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Dimension

Port

Expression

SUM([2014])

I got    Ham 1287

LCH 91... which seems to right to me... What's wrong?

sunny_talwar

Would you be able to share a sample or screenshot where it isn't working? Because like Manish told you that replicating from the data you have provided will give us the right result, but my guess is that you might have other things going on in your application which might be preventing you from the desired numbers.

Not applicable
Author

Hi,

thanks. The expression was as what you have given. the issue was due to column 2014 was loaded into Qlik by means of 012014 + 022014 as 2014... I think the derived values messed up the system somehow.

In the end in the excel file, I created a new column for 2014 and then it worked.

thanks a lot.