Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator
Creator

rank top 10 based on one dim having other dimension in table

HI,

                i want to create a pivot in which top 10 states as per sales (by sum group by state) also want to share products sold in each states such -

Issue.PNG

any solution  guys

7 Replies
Partner
Partner

Hi Ankit,

Try Below Expression :

Your Dimension is :

State

Measure:

1.Sum({<State = {"=Rank(Sum(Sales)) <=10"}>}Sales)


2.count( Distinct Products)


Thanks,

Arvind Patil

Creator
Creator

i need to show Products name as well

Partner
Partner

Hi Arvind,

Can you please explain how this code works??

Partner
Partner

Hi,

As per above picture you will need to create a calculated dimension such as:

Aggr(Sum(Sales), State)

And then have the Products as a third dimension and the expression to be Count(Products) or Count(Distinct Products) depending on what you intend to show.

Creator
Creator

i need top 10 only

Creator
Creator

i need top 10 only and rank function is not working with second dimension

Partner
Partner

I will sahre you sample qvf.