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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Help

I have excel which has 1-100 values

how can i  calculate sum(1-50) records

help me some one

Thanks in advance

rohith

6 Replies
tresesco
MVP
MVP

What are the fields? Do you want to load all rows into qv? Does the summation depend on the row order?

Siva_Sankar
Master II
Master II


can you please upload the file?

NavinReddy
Creator II
Creator II
Author

Hi,

Sample excel take 10 records i need tobe sum 1-5 records

Thanks in advance

rohith

nilesh_gangurde
Partner - Specialist
Partner - Specialist

Hii Niranjan,

Load the table with the where condition. also add the One more field to identify the data.

then concat the rest of the data.

please see the code below,

Load *

      ' 1 -50' as Field

From table_Name where Condition(For 1-50 rows);

Concatenate

Load *

      ' 51 - 100' as Field

From table_Name where Condition(For 51-100 rows);

Then create the chart contaning set analysis with the filter of Field.

Hope this will help.

Not applicable

simply

try rowno() or recno() in script

ex-

load *, rowno() as key,

i

from table;

******************************

or try this in expression

sum(if(key<=5,fieldname))

or try this

sum(if(rowno()<=5,fieldname))

tresesco
MVP
MVP

See here,

Load Sum(If(Recno()<5,Field)) as Sum;  // this will give you sum of first 4 values, i.e - 10

Load * Inline [
Field
1
2
3
4
5
6
7
8
9
];

If you have other dimensions as well, you have to use Group By cluase.