Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Carriage return in expression

Hi,

I would like to insert a carriage return in an expression.  A example would be

=concat({[alternate state1]'field',chr(10)&chr(13)).

I am displaying all the selections in field as the label of an expression. But this doesn't seem to work. Could anyone help me?

Regards,

Xue Bin

1 Solution

Accepted Solutions
jagan
Luminary Alumni

Hi,

I found the issue, it is the problem in Legend.  To fix this

Chart Properties -> Presentation Tab -> Legend Section -> Click Setting button -> Select "Wrap Text" ->

Give Cell Height value to 10 or 20 depending on the values to get.

Check attached screen shot.  Hope this helps you.

Regards,

Jagan.

View solution in original post

12 Replies
m_woolf
Master II

get rid of chr(13)

Not applicable
Author

Hi,

It doesn't work. I made some typo in my previous post though. The expression should be

=concat({[alternate state1]}field,chr(10)&chr(13)).

removing chr(13) doesn't work. And a red line appears under chr(10) indicating some syntax error?

Regards,

Xue Bin

jagan
Luminary Alumni

Hi,

Check attached file

I used

=Concat(F1, chr(10))

Where F1 is a field, it works.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

I don't own a license but i tried to move the expression to the title of the chart and it works.  It seems that the label of an expression only support one line. When I move it back to the label of my expression, it returns only one value. The rest of the values seems to be truncated.

Regards,

Xue Bin

jagan
Luminary Alumni

Hi,

Assign this expression (=Concat(F1, chr(10))) to a variable and try using this variable as a label for expression.

This works for me.  Check attached screenshot.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi,

My objective is to make this 'F1' in your screenshot to

a

b

c

d.

not the title of the chart. I tried to assign it to a variable during loading. But the variable turns out to be empty. I am very inexperienced with variable. Is there a way to declare a variable in visualization?

Regards,

Xue Bin

jagan
Luminary Alumni

Hi,

That is not the title of the chart, it is expression name.  You can create a variable using menu

Settings -> Variables Overview -> Add -> give variable name (Ex: vTest) -> Give variable definition (=Concat(F1, chr(10))).

Now press Ok

Now use variable (vTest) as =vTest in Expression label

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Really appreciate your patience. It still works the same, showing only the first value. I attach some screenshots here. I think it must be some issue with the expression label. I am doing comparative analysis and have two expessions on Y-axis. The labels appear on the right of the graph as shown in the screen shotscreenshot1.pngscreenshot2.png

jagan
Luminary Alumni

Hi,

Can you attach sample file you are working?

Regards,

Jagan.