Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Farzaneh_h
Contributor
Contributor

Display a text in multiple lines

Hi all,

I have a question about displaying text in a table. I have a table that each row presents a store and for every store, we have some products but I want to display all the product information in one cell per store.

We have a '&' separated text as the product Information, and my question is, how can I show every product in each line? (but all of them in the same cell).

Now I have a table like that:

Store NameAddressProducts
store_test1store_address1name:chocolateA, brane:A,price:2300 & name:chocolateB, brane:B,price:2600
store_test2store_address2name:chocolateA2, brane:A2,price:4500 & name:chocolateB2, brane:B2,price:6544

 

I'd like to have multiple lines text in one cell:

Store NameAddressProducts
store_test1store_address1

name:chocolateA, brane:A,price:2300

name:chocolateB, brane:B,price:2600

store_test2store_address2

name:chocolateA2, brane:A2,price:4500

name:chocolateB2, brane:B2,price:6544

 

So I would like to replace the '&' with '\n' (But I don't think Qlik supports \n as the next line)

*As I searched, there is a function ''subfield()'', but I think this function split the text into separate rows, so I can't display all the lines in one cell! 

That would be excellent if you can help me.

Thanks in advance 

 

Labels (1)
2 Replies
NitinK7
Specialist
Specialist

for product write below expression

=Replace(Products,'&','')

and

table column width adjust based on your requirement.

NitinK7_0-1626791109239.png

 

Farzaneh_h
Contributor
Contributor
Author

Hi NitinK7, thanks for your reply.

How can I adjust the column width, when the product information (in each line) doesn't have the same size?

I mean for one product we have 50 characters and for another product, 200 characters and some characters from the long_chars_product jump to the previous line with 50 chars.