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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Leo2
Contributor III
Contributor III

[Chart expressions] struggling with "previous/next in a row"

Hello!

I've got very simple task but struggling like hell with it! Therefore asking for help...

I have some rankings like

Country, Position, Year

Albania, 1, 2015

Angola, 2, 2015

USA, 3, 2015

etc...

I need to make a bar chart with 3 bars showing the countries and their ranks. In the middle some definite country, for example Angola. On the left and right - "neighbours" in the ranking: one position above, and one below. Rankings change in time (Year). Would much appreciate any hint to manage this task. How should expressions for the previous/next look like? May be calculated dimension?

2 Replies
Anil_Babu_Samineni

Will talk first in Tabular format? What is the result you want to see as table?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Leo2
Contributor III
Contributor III
Author

Hmm... Kind of:

 

Country, Rank

Country 1, Rank X - 1

Country 2, Rank X

Country 3, Rank X + 1

We know Country 2 and it's rank.  We also know ranks for other countries, but need to figure out the formula to find out string for the names of Country 1 and 3.