Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
arvind_patil
Partner - Specialist III
Partner - Specialist III

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

Anonymous
Not applicable
Author

i need to show Products name as well

vishus913
Partner - Creator
Partner - Creator

Hi Arvind,

Can you please explain how this code works??

niclaz79
Partner - Creator III
Partner - Creator III

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.

Anonymous
Not applicable
Author

i need top 10 only

Anonymous
Not applicable
Author

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

arvind_patil
Partner - Specialist III
Partner - Specialist III

I will sahre you sample qvf.