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

TOP <NUMBER> TOTAL in Qlikview

Dear All,

i have table which shows CITY wise TURNOVER of particular selected MEMBER like:

i have Select MEMBER 'A'.

CITY
SUM(TURNOVER)
DELHI100
MUMBAI200
PUNE150

Now my requirement is to get SUM(TURNOVER) of TOP 5 MEMBERS of that CITY. like

i have Select MEMBER 'A'.

CITYSUM(TURNOVER)
TOP 5 MEMBERS OF THAT CITY TURNOVER
DELHI100500
MUMBAI200300
PUNE150550

Kindly let me know how can this possibel

Thanks in Advance.

Regards,

JKV

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Use this expression.

=sum({1<CITY=P(CITY)>} aggr( if(rank(Sum({1}TURNOVER))<=5, Sum({1}TURNOVER)), CITY, MEMBER))

View solution in original post

7 Replies
Not applicable
Author

PFA, use dimension limit.

balasundaram
Creator II
Creator II

Write a set expression by using rank function include member.

jagan
Luminary Alumni
Luminary Alumni

Hi,

If you attach some sample data or some sample file then it would be easier to help you, otherwise no one is interested to prepare data and then give solution.

Check below link

Qlik Community Tip: Posting Successful Discussion Threads

Not applicable
Author

below is the formula to get the RANK on a city of particular selected Member.

min(aggr(rank(NUM(sum({<MEMBER_NAME=>} TRADE_VALUE))),CITY_CLNT,MEMBER_NAME))

But i want sum of TURNOVER OF top 5 MEMBERS

Not applicable
Author

Dear All Please find attached Excel file for sample table and result table with color indicator

Not applicable
Author

Hi Navdeep,

Thanks for help, but that is not what i need.

the Member is not the part of the dimension in a table its just a part of the selection.

find attached excel sheet that will help you to get what exactly i need 

Thanks

jagan
Luminary Alumni
Luminary Alumni

Use this expression.

=sum({1<CITY=P(CITY)>} aggr( if(rank(Sum({1}TURNOVER))<=5, Sum({1}TURNOVER)), CITY, MEMBER))