Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Multiple lines in Pivot and Straight table cells in QlikSense

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
vinieme12
Champion III
Champion III

Multiple lines in Pivot and Straight table cells in QlikSense

Last Update:

May 2, 2022 9:35:54 AM

Updated By:

vinieme12

Created date:

May 2, 2022 9:35:54 AM

[Paragraph format. Descriptive text here. See Content Guidelines for details. You can remove sections that are not needed for your article. If subheaders are needed, use heading 3 or heading 4 formats.]

 

Description:

  • By default Straight tables only allows maximum of 3 lines in a cell to be visible and Pivot tables are limited to one line only

Resolution

By using a Multi-KPI object we can inject custom CSS onto the sheet to override the default limitations on pivot & straight tables

Step1:

Drag a Multi-KPI object onto the sheet  and add a dummy measure example = 1;

Next, on the Properties panel of the Multi-Kpi object navigate to Appearance >> Styles

Add CSS hereAdd CSS here

 

Step2:

Paste the custom below

For Straight Tables add the below CSS snippet in the Styles(CSS) box

.qv-st .qv-st-value .qv-st-value-overflow {
max-height: none;
}

For Pivot Tables add the below CSS snippet in the Styles(CSS) box

.qv-pt .cell .value {
max-height: none;
white-space:pre
}

 

As shown below now each cell will fit to content of the cell based on line breaks in the content

OutputOutput

 

Cheers

Vineeth P

Comments
Chotana2
Partner - Contributor III
Partner - Contributor III

Hi Vineeth

 

Awesome!! Exactly what I was looking for for several days.

But the width of my columns are unknown, and I can't change it ; I have the horizontal scrollbar, but I can't change the width manualy

If I force the width like this :

.qv-pt .cell .value {
max-height: none;
white-space:pre;
width:250px
}

Then I do have a smaller cell, but I don't have several cells displayed , only one

Any thought?

 

Thanks

0 Likes
Chotana2
Partner - Contributor III
Partner - Contributor III

and it's chr(13) that's working for me in a pivot table

 

Concat(DISTINCT todo, chr(13))

0 Likes
vinieme12
Champion III
Champion III

Hi@Chotana2   ,

 

I'm unable to replicate your issue, can you post a sample app?

vinieme12_0-1681720281000.png

 

0 Likes
Chotana2
Partner - Contributor III
Partner - Contributor III

Hello @vinieme12 

Well finaly I used a Vizlib Pivot table, with option

'Text is HTML'

and

concat(DISTINCT tasks, '</BR>')

 

I don't understand why it was not working with your solution. Thanks anyway.

 

Contributors
Version history
Last update:
‎2022-05-02 09:35 AM
Updated by: