Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Does someone could inform me about the feasibility to retrieve some characters ("as STXT (N3; 6; 2)" in excel) but with QlikView? and create a new field?
Then, once this character has been recovered, is it possible to assign a specific name?
My example in Excel:
=SI(STXT(L2;6;1)="0";"DLP1";SI(STXT(L2;6;1)="1";"DLP1";SI(STXT(L2;6;1)="2";"DLP2";SI(STXT(L2;6;1)="3";"DLP2";"Unknown"))))
Thank you in advance for your assistance,
Best regards
Matthieu
I think..
STXT you can use MID function in QlikView
Would you be able to share some sample data with expected output?
Hello,
Thanks for your answer, it is very useful.
Do you have a proposition regarding 2nd question ?
I mean, once I have recovered the appropriate characters,
Ex:
If I retrieve 10R or 20L, could you tell me if I can assign a name for each number or letter ?
1 = machine A
0= machine B
R=machine C
...
Let me know if I am not clear ?
regards,
Hi Matthieu,
Try,
Pick(Match(Mid(FieldName,1,6), 0, 1, 2, 3)+1, 'DLP1', 'DLP1', 'DLP2', 'DLP2', 'Unknown')
Change the FieldName as per your application.
Most of the formulation you can achieve of Excel in qlikview..How ever name and syntax would be different.
suggested here assume you are having a field in QV named like Stext with value of 123er4 then, you can use mid() like this:
mid(FieldName,StartNum,EndNum) as NewFieldValue;
hi,
Try this expression
IF( mid(TextField,6,1)=0 OR mid(Text,6,1)=1,'DLP1',
IF(mid(Text,6,1)=2, OR mid(text,6,1)=3,'DLP2'))
If you have data like 1,0,R in a Field say NewField, then you can do like this at script:
If(NewField='1', 'Machine A',
If(NewField='0', 'Machine B',
If(NewField='R', 'Machine C'))) as FieldName
you can use pick and match function
Hello Sunny K,
I have tried your expression and it works very well !
Thank you very much.
Regards,
Matt