Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting Issues

Hi All

I need Help at Gui Application (Front end) Level

I have this Chart:

Sorting.png

Here in above Chart I am using Rank function to calculate Top 3 and Rest will Fall under Others.

I need following things:

1) Others Category will always come below after Top 3 Rank Holders.

2) Month should display as per the Latest Month.

   The Month should be Mar, Feb, Jan rather than  Jan, Feb, Mar.

I have sorted the Chart as per the Latest Month. See the Sort Expression Tab.

Anyone has faced such scenario during their Project than please provide the solution.

I have attached the qvw for reference.

Regards

Cire

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be sort using this:

If(Aggr(NODISTINCT Rank(Sum(Amount)),Code)<=3,Sum(Value))

View solution in original post

7 Replies
sunny_talwar
MVP
MVP

This

Capture.PNG

Sort for your 1st dimension (Ascending)

Match(If(Aggr(Rank(Sum(Amount)),Code)<=3,Code,'Others'), 'Others')

Sort for your 2nd dimension (Descending)

Month(Date#(Month_New, 'MMM'))

Not applicable
Author

Hi Sir

Great Solution.

But I want Max Month wise Amount Sorting. Like this:

Final Result.png

Can we get this end Result. I have done sorting in Sort Expression like this Sum({<Month={$(vMaxMonth)}>}Amount)

Is there any other way.

Regards

Cire

Not applicable
Author

Sir Need your help on this.

sunny_talwar
MVP
MVP

May be sort using this:

If(Aggr(NODISTINCT Rank(Sum(Amount)),Code)<=3,Sum(Value))

sunny_talwar
MVP
MVP

I just responded. See my response below

Not applicable
Author

Thanks Sir

You are Great. Your Solutions are small and Powerful.

That's the Beauty of Real and Genuine Coder.

Learning a lot of things from you.

I am just following your footsteps.

I have modified your Expression like this:

If(Aggr(NODISTINCT Rank(Sum({<Month={$(vMaxMonth)}>}Amount)),Code)<=3,Sum({<Month={$(vMaxMonth)}>}Amount))


and it worked.

Many-Many Thanks Sir to you.

Regards

Cire

sunny_talwar
MVP
MVP

No problem. I am glad I am able to help you learn.

Best,

Sunny