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

Rank with a dimention that is not in the chart

Hi,

I have a table Like This:

                                                                                                                            

CompanyYearRatioValue
CEUJ2011Ratio15593525
CEUJ2012Ratio15367548
CEUJ2013Ratio15544482
CEUJ2014Ratio14875582
CEUJ2015Ratio11714342
CEUJ2011Ratio22494074
CEUJ2012Ratio21661454
CEUJ2013Ratio28148792
CEUJ2014Ratio28200381
CEUJ2015Ratio28190812
DOGD2011Ratio13451768
DOGD2012Ratio12334441
DOGD2013Ratio16271079
DOGD2014Ratio14344662
DOGD2015Ratio18181262
DOGD2011Ratio25350576
DOGD2012Ratio21177257
DOGD2013Ratio25170544
DOGD2014Ratio26574504
DOGD2015Ratio26693989

then I have a Chart with Year & Ratio as Dimension & Value for One Company as Expression.

Now, What I want is to show rank of Company in given Year & Ratio as Expression in Chart described above.

I prefer not to change dimensions and to have just one expression. since it affects chart coloring.

Any Idea on How to accomplish this??

Thanks in Advance

BTW I have attached my sample file.

12 Replies
Not applicable
Author

Here is the expression I used.

Note that I used 'Only' because I haven't filtered the data with company. instead I have a second field called selected company that determines which company is supposed to be shown.

only({<Company={$(=SelectedCompany)}>}aggr(rank(sum(aggr(sum(Value),Ratio,Year,Company))),Ratio,Year,Company))

if I was filtering data with company the formula would be like this:

Aggr(Rank(Sum({<Company>} Aggr(Sum({<Company>} Value),Ratio,Year,Company))),Ratio,Year,Company)

Not applicable
Author

BTW Could you explain what the expression does for further development??

Digvijay_Singh

Thanks for sharing!