Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
alerse
Contributor II
Contributor II

newline in expression

Hi

I've tried everything but cant figure out how to insert a new line character... I would like to show these three fields below each other. nl doesn't work...


=Maxstring(If([L1] = VarL1Out and Isnull([L2]),[HoverText])) &'. Actual: '
&Maxstring(If([L1] = VarL1Out and Isnull([L2]),[Actual])) & '. Target: '
&Maxstring(If([L1] = VarL1Out and Isnull([L2]),[Target]))
{/code]
Currently the help text looks like this:
My hovertext. Actual: 50.4. Target: 55.5
I want to be like:
My hovertext.
Actual: 50.4.
Target: 55.5</body>
1 Solution

Accepted Solutions
Not applicable

Hi,

Use chr(13) b/w the lines. This function will generate the new line.

- Sridhar

View solution in original post

10 Replies
Not applicable

Hi,

Use chr(13) b/w the lines. This function will generate the new line.

- Sridhar

alerse
Contributor II
Contributor II
Author

Perfect! Thanks!

Not applicable

It does not work on ClikView server with FireFox or Google Chrome...

Not applicable

How about:

&  '\n' &

brian554xx
Contributor III
Contributor III

It usually works to include the newline in your string, like so:

=Maxstring(If([L1] = VarL1Out and Isnull([L2]),[HoverText])) & '. Actual:

' & Maxstring(If([L1] = VarL1Out and Isnull([L2]),[Actual])) & '. Target:

' & Maxstring(If([L1] = VarL1Out and Isnull([L2]),[Target]))

Not applicable

Hi,
That trick really helps, and its very simpler. Thanks for sharing!

I'm using Qlik Sense 3.2 SR2 and the chr(13) didn't worked for me, but breaking a literal new line inside the quotes did the trick. I tried that to break two complimentary information in two lines as a Bar Chart measure description.

Anonymous
Not applicable

Can you please share the expression how you did it. Thank you.

brian554xx
Contributor III
Contributor III

My expression is shown in my earlier post. If you're asking for Fernando's expression, I am certain it is similar.

If I misunderstand, please correct me.

akshay_goyal
Contributor
Contributor

The expression posted in the problem statement and the solution looks exactly same. Can you please post the solution expression again?