Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Wrap text

Hi,

I need to show Corpus and The Valley in single line.Please find the below image.

Untitled.png

Below is the code used to wrap the text.

=if(SubStringCount(trim(Market),' ')<=6,

  SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',1)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',2)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',3)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',4)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',5)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',6)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',7)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',8)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',9)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',10)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',11))

Thankk..

4 Replies
Anil_Babu_Samineni

Does this object is fixed, Or you may can increase the height to show single line for axis.

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
thomaslg_wq
Creator III
Creator III

Is this already the case in the source value ?

If so : maybe you only want to replace the [return to line] by a [space].

So use this :

replace(Market,chr(10),' ')

Chanty4u
MVP
MVP

try  like below  with your fields . its working for me in one project.

=left(Account, findoneof(Account, ' ', ceil(substringcount(Account, ' ')/2))) & chr(13) & chr(10) & right(Account, len(Account) - findoneof(Account, ' ', ceil(substringcount(Account, ' ')/2)))

rubenmarin

Hi, your expression splits the strings by each ' ' it founds, and insert a chr(13) -new line- after each two ' ' it founds.

The bold-red text is causing the next line in that case:

=if(SubStringCount(trim(Market),' ')<=6,

  SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',1)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',2)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',3)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',4)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',5)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',6)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',7)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',8)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',9)

  &' '&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',10)

  &chr(13)&SubField(replace(replace(replace(trim(Market),' -- ','-'),' - ','-'),' (','('),' ',11))

You want to show in one row all values or just this one? for just this one you should add an exception to this value (maybe using a simple if), to remove the new line from all values revome the bold-red text in your code (this will insert a new line character after the 4th ' ' it founds.