1 Reply Latest reply: Aug 9, 2016 6:43 AM by Jonas Hertz RSS

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

    Aldo Liaks

      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;