Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello Dears
I want Order Excel File In Load Script
But Get Error.
Plz Help Me
Populations:
Load *, Num( Population) as pop;
LOAD Rank,
[Country (or dependent territory)] as country,
Date,
Population,
[% of world population],
Source
FROM
TB01_20150721_222616.xls ;
Pls can elaborate what's the requirement. Do you want to sort the excel data ?
no ,i want load Excel File Into Qlikview
And in load Script Order by Country Or Rank ,...
Something like this
Populations:
Load *, Num( Population) as pop;
LOAD Rank,
[Country (or dependent territory)] as country,
Date,
Population,
[% of world population],
Source
FROM
TB01_20150721_222616.xls ;
Population_New:
noconcatenate
load *
resident Populations
order by country;
drop table Populations;
Thanks,
This code is similar to code
But there is still a problem
Populations:
LOAD Rank,
[Country (or dependent territory)] as country,
Date,
Population,
[% of world population],
Source
FROM
[https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population]
(html, codepage is 1256, embedded labels, table is @1);
PopulationsOrder:
noconcatenate
Load * resident Populations order by country asc;
Drop table Populations;
---------------------------------------------------------------------------------------
Result Is Not Valid
If you check with preview in the Table Viewer you can see that they have been loaded ordered by country.
But the Table Box you display it in here is most likely set to sort on %population, check the properties.
In your image, you are sorting by '% of world population' as denoted by the ^ arrow on the field.
Using order by affects the load order of the data not the final display order you decide within an object. You need to use 'load order' in the sorting option of the object.
hope that helps
Joe
Unless there is a specific reason to sort data while loading,it is not necessary to load data in order w.r.t any columns. if you are doing some aggregate at script level then this is necessary.
Otherwise sorting can be done at chart level on different combinations.
I Used Table Box ,only Show Data.
but i want sort in Load Script.(without property in chart)
but But does not apply correctly
I want a piece of code that I wrote to chart settings have priority (The highest priority With load Or Resident Load)
-----------------------------------------------------------------
Populations:
LOAD
country,
Date,
Population,
Rank,
Source
FROM TB01_20150721_222616.xls
(biff, embedded labels, table is [Sheet1$]);
PopulationsOrder:
noconcatenate
Load *
resident Populations order by Rank desc;
Drop table Populations;
-----------------------------------------------------------------
Please check in File > Table Viewer, right click on the PopulationsOrder table and select Preview.
There you will see the true load order which should be as specified by Rank in this case.
For the Table Box, right click and select Properties, and go to Sort tab.
make sure that Load Order is the only selected option.
Any other order selected will override the load order.