Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sarfaraz_sheikh
Contributor III
Contributor III

Regarding top 3

Dear ALL,

I want to select top 3 rankers from given table as below:-

Location                    Total Inward

Banglore                    1

Gaziyabaad                5

Thane                         3

Chennai                      20

Delhi                          25

Bhopal                       16

Expected output :-

Location                       Total Inward

Delhi                              25

Chennai                          20

Bhopal                           16      

I want the output should return Top 3 order from normal one...in case of oracle i used rownum >= number( specified by us)....how i can achieve the same in QlikView.

Sarfaraz

1 Solution

Accepted Solutions
its_anandrjs

Hi,

Take calculated

Dim:- =aggr(if(Rank(sum(Total_R))<=3,Location),Location)

Expre:- =sum(Total_R)

Note:- And in dimension select suppress when value is null option selected.

Regards

Anand

View solution in original post

18 Replies
Anonymous
Not applicable

Hi Use like this : you will get row no.

load *,

RowNo() as S_No


Resident table_1

ORDER BY [Total Inward] ;

its_anandrjs

Let me know this is table fields or it is any chart.

Regards

Anand

anbu1984
Master III
Master III

Temp:

Load * Inline [

Location,TotalInward

Banglore,1

Gaziyabaad,5

Thane,3

Chennai,20

Delhi,25

Bhopal,16 ];

NoConcatenate

Final:

First 3 Load * Resident Temp Order by TotalInward desc;

Drop Table Temp;

Anonymous
Not applicable

Hi

can use like this

INTAB:

LOAD * Inline

[

ID,Type,Sal

1,1,12

1,1,12

1,3,12

2,1,11

2,2,15

3,3,22

4,1,10

4,2,10

4,3,20] ;

SECOND:

load ID As ID_R,Type AS Type_R,Sal AS Date_R

Resident INTAB where RecNo()<=3 order by Sal desc;

sarfaraz_sheikh
Contributor III
Contributor III
Author

Hi anand,

It is chart leval calculation....i used one fiels  'Inwd_Creator' in expression and  'location'  as dimention.

And i used count(Inwd_Creator) in Expression for Total Inward ...and i am getting the result same as above.However i want to display Top 3 who has fall in top 3 category..

How i can achieve ....please help

Sarfaraz

amit_saini
Master III
Master III

Hi,

Like this????

Thanks,
AS

sujeetsingh
Master III
Master III

Order your data according to top Inward descending.

use rowno() function

Now in UI just use Dimension limit or calculated dimension.

amit_saini
Master III
Master III

Correct one

alkesh_sharma
Creator III
Creator III

Hyi,

Please find the attached qvw for your reference.