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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Separating each symbol in string

Colleagues, good day!

I have one field, which contain information about delivery days.

For example, if delivery days are Monday, Tuesday - value is MT.

Friday, Saturday- FS.

How i can convert such symbol combination into days concat.

Maybe, it's possible by concat function, which can read string per symbol?

Necessary result:

 

DelDaysResult by exp
FFriday
TTuesdat
MWMonday, Wednesday
SuSunday
MTWThMonday, Tuesday, Wednesday, Thursday
1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

You can use MapSubString in that case. Try this,

Map:
Mapping LOAD * INLINE [
Short, Full
M, ", Monday"
T, ", Tuesday"
W, ", Wednesday"
Th, ", Thursday"
F, ", Friday"
S, ", Saturday"
Su, ", Sunday"
]
;

Tab:
LOAD DelDays, Mid(MapSubString('Map',DelDays),3) as Result
INLINE [
DelDays
F
T
MW
Su
MTWTh
]
;

Untitled.png

View solution in original post

10 Replies
amit_saini
Master III
Master III

Hi,

Try:

Load * Inline [

DelDays ,    Result

F,    Friday

T,    Tuesdat

MW    ,"Monday, Wednesday"

Su    ,Sunday

MTWTh,    "Monday, Tuesday, Wednesday, Thursday"

];

Thanks,

AS

Anil_Babu_Samineni

Like This,

Make sure, You have List box you can write this expression in Expression Tab.

Hope Helpful...

=If(DelDays = 'F','Friday',

     If(DelDays = 'T','Thursday',

          If(DelDays = 'MW','Monday, Wednesday',

               If(DelDays = 'SU','Sunday',

                    If(DelDays = 'MTWT','Monday, Tuesday, Wednesday, Thursday',)

                 )

              )

          )

        )

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Use a if() to create the field is possible to do the outcome FYR:Creating a new field with IF statement  Hope It helps!

Kushal_Chawda

see this

Directory;

LOAD *,

    Pick(match(DelDays,'F','MTWT','MW','Su','T'),'Friday','Monday, Tuesday, Wednesday, Thursday','Monday, Wednesday','Sunday','Tuesday') as Days;

LOAD DelDays

FROM

Test.xlsx

(ooxml, embedded labels, table is Лист1);

Capture.JPG

Anonymous
Not applicable
Author

Thanks.

But i mean some automatic checking by these symbol combination.

I have more than 60 such combination and i need write condition for each of them (count of these conditions can grow)

Kushal_Chawda

I think mine answer is not helpful

sunny_talwar

Nai yaar... esa nai hai... bahut helpful hai

Anil_Babu_Samineni

Kushal,

Not like that, What ever poster expecting we are giving the solutions. He didn't release any thing about what he is looking.

Meantime, That is not a problem - Whoever poster he just release BTA. If he tell something hints then we can try.

- Anil Chowdary

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tamilarasu
Champion
Champion

You can use MapSubString in that case. Try this,

Map:
Mapping LOAD * INLINE [
Short, Full
M, ", Monday"
T, ", Tuesday"
W, ", Wednesday"
Th, ", Thursday"
F, ", Friday"
S, ", Saturday"
Su, ", Sunday"
]
;

Tab:
LOAD DelDays, Mid(MapSubString('Map',DelDays),3) as Result
INLINE [
DelDays
F
T
MW
Su
MTWTh
]
;

Untitled.png