Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated column in load script

Hello,

I'm loading a table from an excel file, I'd like to create a column with calculate values like this:

Load

     [value A],

     [value B],

     [value C],

     [value A] + [value B] + [value C] as vSUM // the new calculated column

FROM

[data.xls]

(biff, embedded labels, table is [Elenco dati contabili$]);

How can I do that?

Thank you.

Lorenzo

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Load

     [value A],

     [value B],

     [value C],

     Rangesum([value A] , [value B] , [value C]) as vSUM // the new calculated column

FROM

[data.xls]

(biff, embedded labels, table is [Elenco dati contabili$]);

View solution in original post

5 Replies
Not applicable
Author

The way you have it should work, if there are nulls in your data you may need to do...

alt([value a], 0) + alt([value b], 0) + alt([value c], 0) as vSUM

simondachstr
Luminary Alumni
Luminary Alumni

Use rangesum() instead of multiple alt() - it automatically turns null() into 0.

alexandros17
Partner - Champion III
Partner - Champion III

Hi Lorenzo,

remember that with front end objects you can always do the sum so I wonder if thet total is really useful ... if it is use rangesum ...

Not applicable
Author

Hi, which is the syntax of rangesum()? How can I use it?

Thanx

anbu1984
Master III
Master III

Load

     [value A],

     [value B],

     [value C],

     Rangesum([value A] , [value B] , [value C]) as vSUM // the new calculated column

FROM

[data.xls]

(biff, embedded labels, table is [Elenco dati contabili$]);