Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Highlighted
rahulsud007
Contributor

Fieldvalue conversion

Hi guys, My input field is the following and

Input
IDMonth
Ak10101
AJ11111

I need output in following way. in

IDMonth
AK1
AK0
AK1
AK0
AK1
AJ1
aj1
aj1
aj1
aj1

Can anyone help me in this?

Tags (1)
10 Replies
MVP
MVP

Re: Fieldvalue conversion

T1:

Load *, Len(Month) as Length Inline

[

  D, Month

  AK, 10101

  AJ, 11111

];

T2:

Load

  D,

  Mid(Month,IterNo(),1) as Month

Resident T1

While IterNo() <= Length;

Drop table T1;

rahulsud007
Contributor

Re: Fieldvalue conversion

Hi Manish, thanks for your reply. But here i am getting the result as OP.PNG  but I need out put as

AK 1 and

AK 0       

AK 1        

Ak 0       

AK 1

AJ 1

AJ 1

AJ 1

AJ 1

MVP
MVP

Re: Fieldvalue conversion

add an id in load, you can use it in straight table chart and hide

T2:

Load

  rowno() as id,

  D,

  Mid(Month,IterNo(),1) as Month

Resident T1

While IterNo() <= Length;

Drop table T1;

rahulsud007
Contributor

Re: Fieldvalue conversion

Hi Massimo, its not working as required. If u are getting it appropriately as I mentioned please share the Qvw.

Not applicable

Re: Fieldvalue conversion

Hi Rahul S,

As Massimo said it works just fine. I tried it on my machine.

Capturers.PNG

MVP
MVP

Re: Fieldvalue conversion

PFA

rahulsud007
Contributor

Re: Fieldvalue conversion

Hi Massimo,

It worked, thanks a lot.

MVP
MVP

Re: Fieldvalue conversion

When I worked on your question, i used IterNo() as id while iteration.. but by mistake has removed while uploading answer..

rahulsud007
Contributor

Re: Fieldvalue conversion

Thanks Manish, for your support.