5 Replies Latest reply: Mar 1, 2018 7:20 AM by Colin O'Donnell RSS

    Padding Text

    Colin O'Donnell

      Hello all,

       

      How do you add spaces to an expression?

      Basically I want to pad text so that I lines up correctly.

       

      I have an expression that says:

      ='Result: £'&Sum(Sales).

      This displays as Result:£123,456

       

      However I would like to display as follows so that it lines up with my worksheet.

      Result:           £123,456

       

      I have tried the following but with no avail (QS seems to remove spaces)

      'Result:                 £'&Sum(Sales)

      'Result: '&'chr(9)&£'&Sum(Sales)

       

      Any thoughts?

       

      As an aside when importing from excel, the following works for me in the script when I am stacking vertical bar graphs and I want the Dimensions to Line up / align:

       

         right('               '&"Dim1",20) as "Dim1",      

          right('               '&"Dim2",20) as "Dim2",

          right('                 '&"Dim3",20) as "Dim3",

          right('                 '&"Dim4",20) as "Dim4",

       

      Cheers,

      Colin