11 Replies Latest reply: Jul 10, 2013 4:49 AM by Amelia D

# Invalid expression by using Sum(A*B)

Hi All

I have a table structure like as below:

ColumnA    ColumnB   ColumnC

AAA           10             2

BBB            20            3

CC              0              4

How does i can acheive the following result:

ColumnA    ColumnB   ColumnC     ColumnD

AAA           10             2                20

BBB            20            3                60

CC              0              4                0

i try the scripts Sum(ColumnB* ColumnC) as ColumnD, however, it return invalid expression after reload.

MC

• ###### Re: Invalid expression by using Sum(A*B)

ColumnB * ColumnC as ColumnD

remove the sum() part

• ###### Re: Invalid expression by using Sum(A*B)

Hi,

could you please help as I am not able to post new messages in qlikcommunity as it  is showing you need moderator permission to post

• ###### Re: Invalid expression by using Sum(A*B)

I am not bale to post the messages in qlikcommunity that's my problem please help as it is getting like below

# Start New Discussion

Please note, your discussion will need to be approved by a moderator before it will be viewable by others.

• ###### Re: Invalid expression by using Sum(A*B)

let see if it can solve your problem.

• ###### Re: Invalid expression by using Sum(A*B)

Thanksfor this  Michael somehow it's helpful why it is stuvked.

• ###### Re: Invalid expression by using Sum(A*B)

thanks.

i save the file at QVD format and able to retrieve the saved fields at othere QVW.

For the same behaviour, i apply it at other document.  however, i can  get three fields only.

i delete the QVD manually and generate it again. Howerver, it cannot show the alias fields. Have anyone experinece the same stituation?

Thanks

• ###### Re: Invalid expression by using Sum(A*B)

Hi MC,

Sum() should be use with Group By.

In your case, we don't need to use Sum() function. You can make it simple by

[Table]:

ColumnA,

ColumnB,

ColumnC,

ColumnB*ColumnC     As ColumnD

From ...

Regards,

Sokkorn

• ###### Re: Invalid expression by using Sum(A*B)

In your 3rd expression pls try below..

Column(1) * Column(2)  as columnD

• ###### Re: Invalid expression by using Sum(A*B)

ColumnB* ColumnC is enough. No need to put the condition Sum

Regards

• ###### Re: Invalid expression by using Sum(A*B)

Hi,

If the column2 and column3 are the expression then try this.

Column2*Column3

Regards,

Kaushik Solanki