Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
dzmitry_shmurye
Partner - Creator
Partner - Creator

Offset in the table

Hi community!

I have the table with the large values in dimention. Some values are in the 2 or more line:

I need add the offset for this values bettween the separator line and the first letter of dimension.

This is the result that I want to get for dimension values (yellow - 2 spaces for every line of the dimension values)

Could enybody help me with this design feature if it is possible?

Thanks!

Labels (1)
30 Replies
sunny_talwar

May be like an expression in straight table:

'  ' & Dim2


Capture.PNG

dzmitry_shmurye
Partner - Creator
Partner - Creator
Author

Thanks for your reply, but some values have 2 line and if I add ' ' & Dim I get the next:

sunny_talwar

May be this:

'  ' & SubField(Dim2, Chr(10), 1) & Chr(10) & '  ' & SubField(Dim2, Chr(10), 2)


Capture.PNG

dzmitry_shmurye
Partner - Creator
Partner - Creator
Author

How you got this result for Dim1 = 5? I think it should be

MOUNTED

EQUIP

REPAIR

according your formula...

florentina_doga
Partner - Creator III
Partner - Creator III

try presentetion wrap cell text

sunny_talwar

So I am not using a space for SubField. I am using Chr(10) which might be coming from your original database, right? Attached is the Excel file I used

dzmitry_shmurye
Partner - Creator
Partner - Creator
Author

In the column 2 you can see initial data (without) separators

In the column 3 you can see the results of your expresion...

t_chetirbok
Creator III
Creator III

If I understand you, you haven't string separated by "Enter" in your data.

so try expression:

=Chr(32)&

if(len(DIM)<=16

    ,DIM

    ,if(len(keepchar(DIM,chr(32)))+1=2

        , SubField(DIM, Chr(32), 1) & Chr(10) & Chr(32) & SubField(DIM, Chr(32), 2)

        , if(len(keepchar(DIM,chr(32)))+1=3

            , if(len(SubField(DIM, Chr(32), 1)&SubField(DIM, Chr(32), 2))<=16

                , SubField(DIM, Chr(32), 1)&chr(32)&SubField(DIM, Chr(32), 2)& Chr(10) & Chr(32) & SubField(DIM, Chr(32),3)

                , SubField(DIM, Chr(32), 1)&chr(10)&chr(10)&Chr(32)&

                if(len(SubField(DIM, Chr(32), 2)&SubField(DIM, Chr(32), 3))<=16

                , SubField(DIM, Chr(32), 2)&chr(32)&SubField(DIM, Chr(32), 3)

                , SubField(DIM, Chr(32), 2)&chr(10)&Chr(32)&SubField(DIM, Chr(32), 3)

                )

            )

        )

    )

)

But it would work if you have 3 words

sunny_talwar

Can you share the qvw where you tried it out?