Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I wanted to know if there is a possibility to insert a line break between the values within an expression.
I have the measure: if(Country='1-World', concat(distinct {$<Country=,Flag={1}>}Country ))
This returns: 'IndiaUsa' and the desired solution is:
India
USA
I want these 2 countries to appear in 2 different rows of the table. Is there any way to achieve this either using a line break function or making any changes in the measure.
Thanks in advance.
You can use the chr(10) character to cause a line break:
if(Country='1-World', concat(distinct {$<Country=,Flag={1}>}Country,chr(10) ))
The limitation is that a cell in Qlik table chart chart will only expand to 3 lines, so if your Concat returns more than 3 values, on the first 3 will be display. A hover-over on the cell will show more values.
You can use the chr(10) character to cause a line break:
if(Country='1-World', concat(distinct {$<Country=,Flag={1}>}Country,chr(10) ))
The limitation is that a cell in Qlik table chart chart will only expand to 3 lines, so if your Concat returns more than 3 values, on the first 3 will be display. A hover-over on the cell will show more values.
Hey,
Thanks for the response this does work, but is there any way to deal with the limitation other than hovering on the table?
Unfortunately, I do not know of a way to get around the 3 line limitation for table cells. I've needed that in the past, but never found a work around. Note that you can use other characters in Concat function to separate the values.
concat(distinct {$<Country=,Flag={1}>}Country,', ') will make the values more readable and if you select the option to "Wrap text in cells" under Appearance -> Presentation in the properties panel for the table, it will automatically wrap to 3 lines.