Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create New Column

Good morning,

I need to create a coulmn that is the total of another column, but I'm checking using TOP function and I always have only the firs row of the column.

I sent one example of my problem, maybe somebody could help me.

Thanks in advance

9 Replies
Not applicable
Author

Let me know if this is what you were looking for mate

Not applicable
Author

I obtain the same results. The problem I think is because the Column 'VALUE' is a Variable and when I include the variable in the expression, I don't have results.

Thanks

Not applicable
Author

hmmm why not upload your qvw or a test version with the variable.

If the value is a variable then only a single value will be selected and this essentially becomes your total.

Anyway, if you upload a sample document I can have a look and see what we can come up with

er_mohit
Master II
Master II

if you talking about chart but

the new create column gives you the total for every row

if you want the same column as previous one  then use sum(Column(1)) or what ever you want depending upon the expression column

but if you want total then sum(total Column(1)) it gives you all the total for every row

or in load script try this

Test:

LOAD * INLINE [

    CATEGORY, VALUE

    1, 1000

    2, 2000

    3, 1500

    4, 1345

];

Q:

LOAD  sum( VALUE) as New

Resident Test ;

hope it helps

See the attached file

Not applicable
Author

Byron,

Attached I sent you the document. Many thanks

Not applicable
Author

Hey mate,

the problem is the variable because that variable does not exists (check variable overview)

Now all you have to do is identify what measure it was suppose to sum and replace the variables inside that expression with the measure you want

Not applicable
Author

try this

tab:

LOAD

    CATEGORY, VALUE

    from table1;

output:

LOAD  sum( VALUE) as Total

Resident tab ;

Not applicable
Author

I need the total of the Column in each row of the next column.

Not applicable
Author

The problem is that VALUE column is not a field in the table, as you can see in my document