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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting top record?

Hi, I want to create a variable and set it to a value in a column in a table I am importing, and all the values in this column are the same, so all I would need is the top row's value. In SQL it would be like SELECT TOP 1 @variablename = columnname from tablename. Can anyone show how I would do this in qlikview? Thanks

1 Reply
Not applicable
Author

If you know how to do it in SQL, create the variable in the SQL load table in the script, rather than doing it dynamically - it saves processing time.

If you have to do it in Qlikview I would use if(RowNo()=1,Variable).