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

Dimenssion limits comparing the current and previous months

Hi i have data

Month           products   city

Jan 2016       10              tokyo

Jan 2016     25                newyork

Jan 2016      45                brazil

Feb 2016        30              hongkong

Feb 2016       15               tokyo

Feb 2016       20                newyork


My requirement is i have a bar chart

I'm calculating sum of products in a particular month

I have applied dimension limits to it show largest 2 values

In january it shows brazil and newyork

In february it shows newyork and hongkong

What i want is i want to compare the same values which are in january to feb ie in feb i want to see brazil and newyork but not newyork and hongkong


Regards

John

    

4 Replies
Anonymous
Not applicable
Author

In your data , In Feb 2016 , there is no  brazil..!!! typo mistake..?

Anonymous
Not applicable
Author

try this

=if(Aggr(Rank(Sum(products)), city,Month)<=2, sum({<city={'brazil','newyork' >}products), 'Others')

rupamjyotidas
Specialist
Specialist

This might work

=if(Aggr(Rank(Sum(products)), city)<=2,city) in calculated dimension

Not applicable
Author

In June the top two profitted cuntries are Argentina and Japan

In May the top two profitted cuntries are America and Argentina

What i want is when i click on jun i want both june and may data to dispaly and the comparision should be between the selected month (jun) and top two values of it  Argentina and Japan to Argentina and Japanin May