Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

aldo-tgh
New Contributor III

Qlik Sense - To show leading /preceding spaces on Pivot Table

Hi Guys,

In a Qlik Sense application - I need to create a pivot table where some of the values in Dimension DIM4 have preceding spaces.

It seems that the spaces "are there" but QS "hides" them. Any ideas how to manage it?

The same in QlikView - will work without any special issues.

Thanks in advance,

Aldo.

Trim of space.png

Data20:

LOAD * INLINE [

    DIM1, DimType, MEASURE1

    My String, No Space, 100

     My String, One leading space, 101

      My String, Two leading spaces, 102

    Next String, No Space, 103

     Next String, One leading space, 104

      Next String, Two leading spaces, 105

];

Data19:

NoConcatenate

LOAD

     DIM1

     ,Chr(39) & DIM1 AS DIM2

     ,Text(DIM1) AS DIM3

     ,DimType

     ,MEASURE1

RESIDENT Data20;

DROP TABLE Data20;

Data:

NoConcatenate

LOAD *

     ,If( DimType ='One leading space', ' '& DIM1

     ,If( DimType ='Two leading spaces', '  '& DIM1

     ,DIM1

     )) AS DIM4

RESIDENT Data19;

DROP TABLE Data19;

1 Reply
jonashertz
New Contributor III

Re: Qlik Sense - To show leading /preceding spaces on Pivot Table

It seems you need to use non-breaking space chr(160) instead of chr(32) for your space:

Can I keep space in chart title?

See also:

Non-breaking space - Wikipedia, the free encyclopedia

Just test your app in different browsers to be certain they will show chr(160) in the way you wish.

Community Browser