Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
andreyfcdk91
Creator
Creator

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

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',)

                 )

              )

          )

        )

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Not applicable

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

andreyfcdk91
Creator
Creator
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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tamilarasu

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