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: 
Not applicable

Rank Text Objects

Hi All, I meet a new question. I got a chart as attachment. It should create a bar chart which shows 5 years' sales value by Region. The bar chart can be created easily. However, I should create some Text Objects above the chart which display each region's name and should be ranked by Sales Value (as the chart's sort). The Year in chart is rolling back 5 years of your selection, so the rank of Text Objects always change with your choice. How can I create such kind of chart? Does anybody has some ideas? Thanks a lot!

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Please find the attached application.

Hope this will help you.

Regards,

Anitha

View solution in original post

9 Replies
Not applicable
Author

Hi,

can u provide ypur sample appn.Try using set analysis in text object

Not applicable
Author

Hi arun, thanks for your reply, but what's the "sample appn" you mean? I have no other material, just the chart format others giving. And I dont know how to use set analysis in text object to catch the Region Name. Maybe aggr() can help me to get regions' sales info, but just Max(aggr()) or Min(aggr()), what can I do for the second one, third one...? And I want to catch each region's ordering, how to achieve it?

Not applicable
Author

Hi,

You can not change position of text objects but yes you can change the values in the text box and handle your scenario.

You can use

firstsortedvalue(region,aggr(sum(sales),region),n)

here you can change n, so if for 1st text box use 1, for second use 2 and so on.

Hope this helps.

..

Ashutosh

Not applicable
Author

Hi Ashutosh, thank you for your reply. This is the first time for me to use "firstsortedvalue". I have tried it in my testing, but it seems not work successfully. I dont know what's the problem. Could you give me some examples?

Not applicable
Author

Hi,

Please find the attached application.

..

Ashutosh

Not applicable
Author

Hi Ashutosh, thank you for spending so much time to help me and I have learned a lot of new things from you, I appreciate it a lot. But I'm afriad i still cannot work out my problem. I share my test .qvw here hope anyone can give me some ideas.

You see, I dont need select any time in this file, it will show the sales info from max year rolling back to 2 years. Generally, the rank is F>E>D>C>B>A. However, when I click Year 2009, the rank of Bar Chart become A>B>C>D>E>F. In this processing, I hope, Text Box could rank as Bar Chart automatically.

In my idea, I think I can do some overlapping Text Objects which record different region name and just have different Trigger Condition. If the trigger correspond with the needs(like" Does the region's sales belong to the First/Second...one?"), then it only should show Text Objcet which record the region name it is. I'm not clear can i and how can i do this trigger? Could some experts help me?

Thanks again!!!

Not applicable
Author

Hi,

Please find the attached application.

Hope this will help you.

Regards,

Anitha

Not applicable
Author

Check the changes made

Not applicable
Author

Hi Anitha&namit, thanks a lot. That's what I want and help me solve this problem. I did a little bit modification about this function to make it more comply with my situation:

=FisrtSortedValue(F1,aggr(sum({<[Year]={">=$(=max(Year)-4)<$(=max(Year))"}>} Fact),F1), n)

Thanks again!

Besides, I still consider another question, though it'not necessary in my this issue:

If more than one vaule of expression share the same lowest sort-order, how can we catch the Dimension by character(A->Z)? And if this situation appear more than one time, it will be more complex, right?

I will consider the question later. Hope more experts can join it and find a solution.~~~