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

Show Certain Row in Straight Table

Dear Team,

i have a following straight table, and i use rowno(total) to get the row number

Employeerowno(TOTAL)
AAA1
BBB2
CCC3
DDD4
EEE5

My question, how do i display certain row? For example, I want to display row 2 to 4. Means showing 3 rows only.

or show row 1 to 4 only

thank you

27 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Script:

Test:

LOAD * INLINE [

Data

AAA

BBB

CCC

DDD

EEE ];

Use this as expression 

=If(FieldIndex('Data', Data)>=2 AND FieldIndex('Data', Data)<= 4, FieldIndex('Data', Data))

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

The table i show actually is the straight table already.

I generate the rowno and assign in a expression

WHere should i put this expression??

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this file.

Regards,

Jagan.

Not applicable
Author

Thanks mohan for the sample

May i know more about this expression

"=If(FieldIndex('Data', Data)>=2 AND FieldIndex('Data', Data)<= 4, FieldIndex('Data', Data))"

Understand the Data is the field name. But what about the 'Data' with Apostrophe?? what should i replace with?

jagan
Luminary Alumni
Luminary Alumni

Hi,

For the detailed help you can check the help file by pressing F1 key.

The syntax for FieldIndex is

FieldIndex('Dimension Name', value) - which will give you the index.

FieldIndex('Data', Data)

In the above I am specifying the column name in single quotes and specifying the value without quotes.  Hope it helps you.

Please close the discussion if my post solves your requirement by clicking correct and useful answers to my posts.

Regards,

Jagan.

Not applicable
Author

Jagan,

Perhaps u may take a look on my file. not every sure how to apply ur method.

as i dun have insert attachment. u may download the file from my google drive

i have the rowno expression, and how do i only show certain rowno. The row no is not the row in database. The row no is created during runtime

https://docs.google.com/file/d/0B6c7Q2c9qyF3cnE5YUR4MnBOMTg/edit?usp=sharing

jagan
Luminary Alumni
Luminary Alumni

Hi,

You just replace the RowNo() expression with this

=If(FieldIndex('Data', Data)>=2 AND FieldIndex('Data', Data)<= 4, FieldIndex('Data', Data))

Please find attached file above for reference.

Regards,

Jagan.

Not applicable
Author

I did replace with the one in your attachment. But it shown '-' for all the row

Untitled.png

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you attach the sample file to your post, I am unable to download from google drive. 

Regards,

Jagan.