Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

if-Anweisung

Hallo,

ich habe derzeit folgende If-Formel als Filter in einer Auswertung:

=if(left(Lagerplatz,5)='KX/SL','XX','OO')

Nun möchte ich jedoch die Abfrage erweitern, dass alle Lagerplätze mit 'SL' an der 4. und 5. Stelle selektiert werden können.

Ein Hinweis:

Der Lagerplatz insgesamt hat 11 Stellen. Über die Right-Formel hätte ich somit das gleiche Problem. Wie kann ich eine Zeichenfolge in der Mitte filtern?

Vielen Dank für eine Rückmeldung im Voraus!

Grüße

Anita

6 Replies
Anil_Babu_Samineni

May be this? Read more Mid - script and chart function ‒ QlikView

=if(left(Mid(Lagerplatz,10,5),5)='KX/SL','XX','OO')

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)
zhadrakas
Specialist II
Specialist II

Hallo Anita,

schau dir mal die mid() Funktion an

Mid ‒ QlikView

Anonymous
Not applicable
Author

Hallo,

vielen Dank für eure Rückmeldungen. Habe es versucht umzusetzen und habe wohl noch einen Fehler in der Formel:

=If(mid(Lagerplatz.StoreLocation,4,5)='SL' or mid (Lagerplatz.Storelocation,5,6)='SL'or mid (Lagerplatz.Storelocation,9,10)='SL', 'Servicelager', 'Operatives Lager')

Kann mir hierzu noch jemand einen Tip geben?

Anil_Babu_Samineni

Sieht gut aus, Was ist das genaue Problem, vor dem Sie stehen?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)
swuehl
MVP
MVP

Das dritte Argument sollte die Anzahl der Zeichen angeben, nicht die Endposition:

=If(mid(Lagerplatz.StoreLocation,4,2)='SL' or mid (Lagerplatz.Storelocation,5,2)='SL'or mid (Lagerplatz.Storelocation,9,2)='SL', 'Servicelager', 'Operatives Lager')

Anonymous
Not applicable
Author

super, das war der entscheidende Hinweis. Danke!

Grüße

Anita Kienzler

Von: Stefan Wühl

Gesendet: Freitag, 12. Januar 2018 15:16

An: Kienzler, Anita

Betreff: Re: - if-Anweisung