Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
mariostia2015
New Contributor II

Exctract rows from excel random

Hello i have a XLS sheet of 1.000 rows. I must extract 5 rows random with almost a city and copy in other xls sheet.

I have tried but i am going crazy.

Please help me. Thank you.

mariostia@hotmail.com

Here there is a xls sample of some rows.

Snap 2016-02-16 at 09.53.37.png

Thanks

Tags (3)
3 Replies
Highlighted

Re: Exctract rows from excel random

May be use Sample 5 before the LOAD statement to randomly select 5 rows from your table.

Table:

SAMPLE 5

LOAD [Account Code],

          City,

          ...

FROM Source;

ecolomer
Honored Contributor II

Re: Exctract rows from excel random

You can use SAMPLE sentence in LOAD in order ti have some record random

MVP
MVP

Re: Exctract rows from excel random

if you want 5 rows with 5 cities

F:

first 5 load *;

load *

from yourexcel

Where not Exists (City);