Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

New line character in qlik sense, chr(10) and chr(13) does not work

Hi

I want to get a new line character in a text box (#1 KPI). chr(10) and chr(13) does not work. How do we do that?

8 Replies
ogster1974
Honored Contributor II

Re: New line character in qlik sense, chr(10) and chr(13) does not work

Due to the responsive nature of the charts it wouldn't make sense to force a break.

If you want to separate chart context make use of the Title, subtitle and footnote fields.

Not applicable

Re: New line character in qlik sense, chr(10) and chr(13) does not work

Thanks Andy! I however need to display two different metrics on a single text object in two different lines? Is there a way we can do this? Do we have some alternatives may be?

Highlighted
MVP
MVP

Re: New line character in qlik sense, chr(10) and chr(13) does not work

I wouldn't say it doesn't make sense to force a line break even with responsive design, since a line break does help readers.

Most word processors allow line breaks etc. independent from the page layout.

To me, it seems more like a limitation of the KPI object expression evaluation to me.

Note that you can use measures in combination with text in a text object (and here you can use line breaks using the text editor).

2017-03-01 21_12_19-Qlik Sense Desktop.png

ogster1974
Honored Contributor II

Re: New line character in qlik sense, chr(10) and chr(13) does not work

If you mock up what you are looking to do we can help you better.

MVP
MVP

Re: New line character in qlik sense, chr(10) and chr(13) does not work

A text object does support multiple expressions, and line breaks:

2017-03-01 22_03_42-Qlik Sense Desktop.png

2017-03-01 22_03_55-Qlik Sense Desktop.png

Not applicable

Re: New line character in qlik sense, chr(10) and chr(13) does not work

Thanks Stefan! The text object had limitation of background color and hence I used the KPI object. Here is what I want to do:

1. count of two fields something like count({<[dim1]={'text1'}>}NAME) & <add a new line> & sum({<[dim1]={'text1'}>}[sales])

2. I also want to change the background colors of the box

3. Center aligned the above

MVP
MVP

Re: New line character in qlik sense, chr(10) and chr(13) does not work

Maybe look into using an extension, e.g. have a look at

Custom Color in Text Object - Qlik Sense

Not applicable

Re: New line character in qlik sense, chr(10) and chr(13) does not work

Thanks Stefan! I will try the extn. However I wanted a native solution if possible. Looks like there isn't.