Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
praveen1108
Contributor

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
MVP
MVP

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

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
Contributor

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

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

assume will is field1 and smith is filed2.

  Sample Data.png

MVP & Luminary
MVP & Luminary

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

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
Contributor

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

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.

Employee
Employee

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

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
Contributor

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

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
Contributor III

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

Are you looking something like field1&'            '&field2

Correct me, If I am wrong.

praveen1108
Contributor

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

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

MVP & Luminary
MVP & Luminary

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

Hi,

Did you tried swuehl solution, it will work.

Regards,

Jagan.

Community Browser