Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Order by

Hi Experts,

This is my script

T1:

LOAD

RowNo() as ROW,

ID,

DATE,

PRODUCT,

SALES

FROM

(ooxml, embedded labels, table is Sheet6) ;//Where RowNo()<20 Order by PRODUCT desc;

NoConcatenate

T2:

load

RowNo() as RANK,

ID,

DATE,

PRODUCT,

SALES

Resident T1 Where RowNo()<20 Order by PRODUCT desc;

DROP Table T1;

I am Writing Order By statement in Script its not working

if I am Writing Order By statement in Resident table its working


Can any one Explain me Why this Behaving like this


Regards,

Mahesh

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Mahesh,

You can do a order by only in resident load of data. It won't work for direct load of QVD and flat files. You can see this in help file.

View solution in original post

8 Replies
tamilarasu
Champion
Champion

Hi Mahesh,

You can do a order by only in resident load of data. It won't work for direct load of QVD and flat files. You can see this in help file.

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

From QlikView Help:

Screenshot_1.jpg

That's the answer I guess.

qlikview979
Specialist
Specialist
Author

OK,Thanks Bro

I have one More Doubt

Is it Rank Function will work with Agg() Function.

Regards

qlikview979
Specialist
Specialist
Author

Hi Mindaugas,

Thanks,

Is it Rank Function will work with Agg() Function.

Regards

tamilarasu
Champion
Champion

Yes. I guess you are asking like below expression.


=Aggr(If(Rank(Sum(Sales))<=10,Customer),Customer)

qlikview979
Specialist
Specialist
Author

Hi Bro,

If I am Doing like this i am getting

sum({<PRODUCT={"=Rank(SUM(SALES))<=10"}>}SALES)


I tried with your Expression  i am not getting any thing

tamilarasu
Champion
Champion

You can use either calcualuated dimension or expression to acheive the result. What I have suggested is calculated dimension formula.

Try like below.


Calculated dimension:


=Aggr(If(Rank(Sum(SALES))<=10,YourDimensionName),YourDimensionName)

Expression:


Sum(SALES)

qlikview979
Specialist
Specialist
Author

Hi,

Thanks  Bro,

I got It

Regards

Mahesh