Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have records in two sheets in excel file.
Sheet A have records 20,000 from jan 2011 to June 2012 and sheet B have records 10,000 from july 2012 to current which is sorted based on date in both sheets.
I created qvw. How can I select to reload the data into qvw with selection of random records in both sheets without depending on sorted date?
Could anyone suggest me please.
Thanks.
Hi Amelia,
maybe:
1. load all data into tmp tables, adding new field with random value
2. order data by value from random field created in point 1 and load first x rows
3. drop tmp tables
regards
D
Hi.
What do you mean by random record?
In qlikview we can read data till specific line.
try below code
LOAD*
FROM
test.xlsx
where RecNo()<59;
Regards
ASHFAQ
See sample load (or select):
SAMPLE 0.25 LOAD * FROM ...
It loads 25% of randomly selected records.
But the number (0.25) is not percent of rows which will be loaded, but probability, that particular row will be loaded.
regards
Darek
Michael Solomovich That's a useful command I had not come across before!
I was considering an approach like Dariusz Mielczarek suggested, but Sample is far simpler to implement.
Thanks Michael for the command i also did not use it ever but while using it decrease the original table rows and load the table, it will so help ful where we need to load some data. But when data need to be loaded randomly like first 100 and then from 300 to 500 and then again from 101 upto i believe it not works.
Thanks & Regards
Correct Darek, I simplified explanation
On the large number of records it is more or less the same.
Of course,
+/- one or two%...
Anyway, helpful command and i also didn't meet it b4
Thanks Michael
Thanks to Michael Solomovich for another neat tip!