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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Excel formulation in QlikView

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

11 Replies
MK_QSL
MVP
MVP

I think..

STXT you can use MID function in QlikView

sunny_talwar

Would you be able to share some sample data with expected output?

Not applicable
Author

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,

tamilarasu
Champion
Champion

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.

Anonymous
Not applicable
Author

Most of the formulation you can achieve of Excel in qlikview..How ever name and syntax would be different.

As Manish Kachhia

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;

sasikanth
Master
Master

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

 

Anonymous
Not applicable
Author

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

Not applicable
Author

you can use pick and match function

Not applicable
Author

Hello Sunny K,

I have tried your expression and it works very well !

Thank you very much.

Regards,

Matt