Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
praveen1108
Creator
Creator

Concatenated fields to be aligned one field to Left and another to right

Hello,

Can any one help me with a function or a workaround to align 2 concatenated fields to be aligned one field to Left and another to right.

For Example:

I am concatinating 2 fields in my expression in a pivot table like [Field1] & '-', & [Field2].

In this i wanted to align field1 to left and field2 to right.

Thanks for the help in advance.

Regards,

PK

10 Replies
swuehl
MVP
MVP

Let's assume you want to left align field1 in a 10 char field, followed by the dash, followed by field2 right aligned in a 10 char field, maybe like

=[Field1] & Repeat(' ', 10-len([Field1]) ) & '-' & Repeat(' ', 10-len([Field2]) ) & [Field2]

praveen1108
Creator
Creator
Author

No,I want to print like this in my Pivot table.

assume will is field1 and smith is filed2.

  Sample Data.png

jagan
Luminary Alumni
Luminary Alumni

Hi,

The attached image shows as two different fields it is not concatenated.  For this use two fields as dimension and in presentation tab

Click on dimension and set the alignment of the dimension in Alignment section (Left/Right/Center).

Regards,

Jagan.

praveen1108
Creator
Creator
Author

Sorry for the confusion..assume that its a concatenated field and filed1 should display left aligned and filed2 should display right aligned...

Please let me know if this helps.

Ralf-Narfeldt
Employee
Employee

If they have been concatenated, there are no more field1 and field2 to display differently aligned, just one field. If there was a full justify alignment option I guess that would fill your requirement, but there isn't.

As Jagan suggested you need to keep separate fields to have different alignment.

praveen1108
Creator
Creator
Author

Hello Guys,

Sorry if i didn't explained well.

I have attached an app..in which i would like to align John and Will to be left aligned and Abraham and smith to be right aligned.

PFA and suggest me. !

Regards,

PK

karthikeyan1504
Creator III
Creator III

Are you looking something like field1&'            '&field2

Correct me, If I am wrong.

praveen1108
Creator
Creator
Author

Yes but if i give space it is not working and other thing is i want field2 to be right aligned..

jagan
Luminary Alumni
Luminary Alumni

Hi,

Did you tried swuehl solution, it will work.

Regards,

Jagan.