Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Indentation in straight table

Hi,

We have to add spaces in front of dimension to indent it in a report format in straight table, we have tried '  ' and char(32) but it's removing spaces on access point. Please suggest some solution.

Ex:-

Travel                                    21

    Travel Local                      15

    Travel International           16

Expense                                21            

Regards,

Navdeep

15 Replies
Not applicable
Author

You should be able to add spaces in a straight/pivot table for example. In the dimensions tab add a calculated dimension and add '    ' & Dimension name. Works with if-statements as well, if you only want to indent some of the dimension values in your chart.

Should also work to do in the script like this:

Test:

Load

   '    ' & Dim1 as Dim2

resident data;

petter
Partner - Champion III
Partner - Champion III

Chr(160) usually works where Chr(32) doesn't.  Chr(160) is so called non-break space. If that fails there is a second option using Unicode space characters like Chr(8192) - a typographic space character.

Not applicable
Author

chr(160) worked, thanks

Anonymous
Not applicable
Author

Hi ,

i think,

SubField(Chr(160),Travel ) as Travel1

Regards,

Bunny

jldengra
Creator
Creator

Sometimes repeating the character ' ' is not enough to add spaces at the left for indentation because they are trimmed and ignored. In those cases, my workaround has been to repeat the tab character Chr(9) instead of ' ' to get the desired indentation.

taylor_jesse
Creator
Creator

Hi,

After indenting a column can you include the column name in an expression? I tried using the chr(160) &''&Name in an expression and it didn't work