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

How to execute two dimension in a single expression

Hai,

Any one pls help me with this fix..?

I have an example here ..pfa

In that I am taking top 10 customers based on order sale amount

I have taken customers as dimension and sum(ordersaleamount) as my dimension.

but I want customers respective country also in a same bar chart near to a customer or near to a value in bracket().

Thanks in advance..

1 Solution

Accepted Solutions
Not applicable
Author

Sathiyanc

I found a way to do this on a bar chart, using the above suggestions of a calculated dimension with the chr(13) or chr(10 added in the middle, you must then also change the direction of the labels. It doesn't work on a bar chart when the labels are horizontal, but if you change the axis labels to diagonal or vertical then it will work, see below image.

example1.png

You can do this at the bottom of the Axes tab as shown below:

example2.png

View solution in original post

12 Replies
Not applicable
Author

Create chart like below.

Calculated Dimension = Customer&'('&Country&')'&

Expression = Sum(ordersalesamount)

Regards,

Kabilan K.

Not applicable
Author

Thanks for your reply ..

I have an another doubt If I want country in a new line means ..what calculated dimensions I want to wrote..?

thanks in Advance

Sokkorn
Master
Master

Hi,

Try this

=Customer &

'(' & Country & ')'

or

=Customer & Chr(13) & '(' & Country & ')'

Regards,

Sokkorn

Not applicable
Author

Thanks..

But its not coming in a new line instead of its coming in the sameline

Sokkorn
Master
Master

Hi,

What new line you refer to? Is it enter line? Can you give a sample result that you looking for?

Regards,

Sokkorn

Not applicable
Author

IF you are using V11 and the Ajax client then for whatever reason, best known to QlikTech, I have found that chr(13) no longer works, I've had to change every one of my expressions that use this.

Sokkorn's solution is correct up to V10 and on the IE Plugin and/or desktop client, for V11 on Ajax you should use.

=Customer & Chr(10) & '(' & Country & ')'

But also, if you have a dimension that runs over two lines you need to ensure that your table is setup to allow cells to be over two lines (on thepresentation tab).

Not applicable
Author

Hai I want customers country name just below.

for eg : I want Ireland below Robert Bolero..what settings I want to change in presentation tab..Please give clear explanation..

Not applicable
Author

I cannot see your image I'm afraid, so I don't know what chart type you are using.

This works on a straight table and pivot table.

I thought my explanation was pretty clear, but here goes again.

Go to the presentation tab

Find the box next to Wrap cell text

check the box

click ok

Sokkorn
Master
Master

Hi Nigel,

FYI, I'm using v11 SR2 and Chr(13) is working find for me.

Regards,

Sokkorn