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

top 10 Range in script


Hi,

I need to load only the top10 Quarter Sales  and need to do this in scripting .

Suggest me

6 Replies
martinpohl
Partner - Master
Partner - Master

find attached

sujeetsingh
Master III
Master III

Write condition as where rank <=10

You can derieve ranks by RANK() function.

Anonymous
Not applicable
Author

Hi Martin,

that is not up to the requirement.

what we want is 2014(Q1-Q4) ,2013(Q1-Q4), 2012(Q3,Q4) as these are top 3 years and associated Quarters

we want only 10 Q's

martinpohl
Partner - Master
Partner - Master

don't understand.

the top years are 2014, 2013 and 2009

please define what quarters are wanted.

as you wrote top 3 years and 10 quarters, but one year is having 4 quarters = 12 quarters for 3 years

Anonymous
Not applicable
Author

Hi,

I need to optimize my load I want to laod only 2014(Q1-Q4), 2013(Q1-Q4) and 2012(Q3,Q4)

these are maximum year Quarters. So, I need them

hope this time you understand a bit clear

anbu1984
Master III
Master III

So you need maximum year quarters irrespective of sales?

Temp:

LOAD Year,

     Quarter,

     Sales

FROM

[NEw.xlsx]

(ooxml, embedded labels, table is A, filters(

Replace(1, top, StrCnd(null))

));

NoConcatenate

Final:

First 10 Load * Resident Temp Order by Quarter Desc;

Drop table Temp;