Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression / Set Analysis

How can we write an expression to return the value of a field at row number 20?

8 Replies
Anonymous
Not applicable
Author

Is Row Number a field in your data model or does this refer to a line in a chart?

Not applicable
Author

Field 1Field 2
A100
B200
C150
D120

Row number is the line number of an excel sheet from which data is taken. For example, I want the value of "Field 2" at row number 3 which is "150"

Not applicable
Author

Add this to your script:

rowno() as row,

Anonymous
Not applicable
Author

I would add this to the load statement for this table from excel:

TableName:

Load

....

RowNo() as RowNum

....

;

SelectedRow:

Load

*

Resident TableName

where RowNum = 20;

You can then use any information from SelectedRow in your scripting. If you plan on using this in a chart in the document itself, I would recommend a Set Analysis expression:

sum({$<RowNum = {20}>}Field1)

maleksafa
Specialist
Specialist

you can add in your script while loading the data rowno() and then in your set analysis you can filter on that.

Not applicable
Author

Hi,

Table:

Load *, rowno() as rownum

         From Sample.xls;

Tab2:

Load *

resident Table where rownum=3;

(Or else)

Tab2:

Load *

resident Table where rownum>3 and rownum<4;

Drop table Table;

Anonymous
Not applicable
Author

RowNo( )

Returns an integer for the position of the current row in the table QlikView

Anonymous
Not applicable
Author

Nishant,

Given the number of nearly identical responses to mine, I would appreciate the points if this has solved your problem.

Many thanks,

Steve