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

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?

10 Replies
MK_QSL
MVP
MVP

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

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

maxgro
MVP
MVP

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

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

Not applicable

Hi Rahul S,

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

Capturers.PNG

maxgro
MVP
MVP

PFA

rahulsud007
Creator
Creator
Author

Hi Massimo,

It worked, thanks a lot.

MK_QSL
MVP
MVP

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

rahulsud007
Creator
Creator
Author

Thanks Manish, for your support.