Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
imtiaz_ullah
Creator
Creator

Carriage Return/Linefeed in Expression

Hi I am trying to add a new line in an expression in QlikSense but cannot get anything to work.

I have tried the below, and have also tried using \n to no avail. Any thoughts?

'Origin:' & Origin & Chr(13) & Chr(10) & BrandName & ' - ' & AncType & '(' & AncSubType & ') = ' & COUNT(CustomerID)

Thanks

Immy

1 Solution

Accepted Solutions
Colin-Albert

What type of chart / object are you using?

Chr(10) works in the expression of a text box.

sense2.JPG

View solution in original post

10 Replies
datanibbler
Champion
Champion

Hi,

in strings, chr(10) always worked for me up to now - chr(10) was never needed.

But I am working with QlikView, not QlikSense, so there might be a difference?

Best regards,

DataNibbler

Colin-Albert

What type of chart / object are you using?

Chr(10) works in the expression of a text box.

sense2.JPG

imtiaz_ullah
Creator
Creator
Author

Am using an extension from a 3rd party. Do you think the issue is with them?

Colin-Albert

Yes it could be.

Test your expression in a standard object such as the Text & Image object, and if that works, it is an issue for the developer of the extension.

imtiaz_ullah
Creator
Creator
Author

Yes, correct. I'll throw it back to them. Thanks

Colin-Albert

One other thought, try adding a Maxstring() around any other fields in your text expression, as all fields should be referenced using some aggregation function.

If you do not specify an aggregation expression then QlikView can effectively add an only() around the expression thus the value will return null unless only one value is returned. I guess this also applies in Sense.

Try

'Origin:' & maxtstring(Origin) & Chr(13) & Chr(10) & maxstring(BrandName) & ' - ' & maxstring(AncType) & '(' & maxstring(AncSubType) & ') = ' & COUNT(CustomerID)

imtiaz_ullah
Creator
Creator
Author

Doesn't look like QS likes the maxstring function.

Colin-Albert

maxstring(name) & ' ' & count(customer)  works fine in a text object for me in Sense 1.1.0

Try adding your expression in a text object rather than the 3rd party extension.

Prove your expression works first.

imtiaz_ullah
Creator
Creator
Author

Official reply from Idevio Support - "Sorry, but only single line labels are supported."