Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prasadcm
Creator II
Creator II

Dynamic string concatenation & sort

Hi,

Capture.PNG

The value in listbox is made of 4 fields as shown above,I need output as shown above
Since 3rd field consists of C & 1st field consists of T....so now 3rd field should come before 1st.

Regards,

Prasad !

1 Solution

Accepted Solutions
prasadcm
Creator II
Creator II
Author

Hi All,

Replace characters with Ascii numbers in a string

Replace characters with Ascii numbers in a string

I used the code in above link to solve the problem.

Regards,

Prasad

View solution in original post

10 Replies
Chanty4u
MVP
MVP

jst chk ur sort tab properties

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

What you are saying is if Field3 is < Field1, concat with F3 first, otherwise F1. So write it that way as an if. I'm using F1 etc to avoid typing out your long field names.

=if(F3 precedes F1

,F3 & F2 & F1 & F4

,F1 & F2 & F3 & F4

)

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

prasadcm
Creator II
Creator II
Author

Hi rob,

I tried the following

=if(MaxString([Internal Partner company code])< MaxString([Company Code]),

    [Internal Partner company code]&'.'&[Internal Partner Company Buline]&'.'&[Company Code]&'.'&[Buisness Line]

        ,[Company Code]&'.'&[Buisness Line]&'.'&[Internal Partner company code]&'.'&[Internal Partner Company Buline])

I am getting what is needed but u need to select something from listbox.
I want it to be sorted without any selection since I will be using that field in straight table.

Regards,

Prasad

prasadcm
Creator II
Creator II
Author

Hi,

Dat wont work,i have alrdy tried it.

Regards,

Prasad

Digvijay_Singh

Try like this -

=if(only([PartnerCode])< only([CompCode]),

    PartnerCode & '.' & BusLine & '.' & CompCode & '.' & PartnerCon,CompCode & '.' & BusLine & '.' & PartnerCode & '.' & PartnerCon)

Digvijay_Singh

Use this one -

=Aggr(if(only([PartnerCode])< only([CompCode]),

    PartnerCode & '.' & BusLine & '.' & CompCode & '.' & PartnerCon,CompCode & '.' & BusLine & '.' & PartnerCode & '.' & PartnerCon),CompCode,BusLine,CompCode,PartnerCon)

PradeepReddy
Specialist II
Specialist II

try to do it in the  script instead of chart.

sasiparupudi1
Master III
Master III

Please post a sample

prasadcm
Creator II
Creator II
Author

Hi,

This works on selection,but i want it displayed without any selection.

Regards,

Prasad