# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
New Contributor III

## how write Calculated dimension using if,rank and concat

Dears

I wrote following calculated dimension which is show my top 10 selling titles based on revenue for current year.

Dimension: =if(Aggr(rank(sum({<Year={"\$(=Max(Year))"}>}Revenue)),SellingTitle)<=10,SellingTitle)

now I want to concat my selling title with Content Title  in this code

Fields: SellingTitle, ContentTitle

Labels (3)

• ### Concat()

1 Solution

Accepted Solutions
Highlighted
Contributor III

## Re: how write Calculated dimension using if,rank and concat

Hey,

in the dimension itself you can use '&' symbol to put together two dimensions.

=if(Aggr(rank(sum({<Year={"\$(=Max(Year))"}>}Revenue)),SellingTitle)<=10,SellingTitle & ContentTitle)

you can add ' - ' to make it look better:

=if(Aggr(rank(sum({<Year={"\$(=Max(Year))"}>}Revenue)),SellingTitle)<=10,SellingTitle& ' - ' &ContentTitle)

2 Replies
Highlighted
Contributor III

## Re: how write Calculated dimension using if,rank and concat

Hey,

in the dimension itself you can use '&' symbol to put together two dimensions.

=if(Aggr(rank(sum({<Year={"\$(=Max(Year))"}>}Revenue)),SellingTitle)<=10,SellingTitle & ContentTitle)

you can add ' - ' to make it look better:

=if(Aggr(rank(sum({<Year={"\$(=Max(Year))"}>}Revenue)),SellingTitle)<=10,SellingTitle& ' - ' &ContentTitle)

Highlighted
New Contributor III

## Re: how write Calculated dimension using if,rank and concat

Dear   y_grynechko

Thank you so much, it is working fine.

but I faced with another problem!

now my Content Title is not sorted, because I need show top 10 content title and selling title based on revenue,

every selling title may have multiple content title

can you help me how fix that?

=if(Aggr(rank(sum({<Year={"\$(=Max(Year))"}>}Revenue)),SellingTitle)<=10,SellingTitle& ' - ' &ContentTitle)