Hallo alle,
Ich möchte das "By" in einem Aufruf der Pareto-Funktion skripten.Mir ist aufgefallen, dass Pareto-Plots, die mit "By" gezeichnet sind, so aussehen:
Pareto Plot(Cause( :SBIN_NAM ), X( :Insertion ), Where( :lot_id == "4LU31HFN00_E95029" ))
Das "Where" implementiert das "By"-Feld aus dem Pareto-Funktionsdialogfeld.
Also, ich habe ein JMP-Skript, in dem ich Pareto-Plots nach einer Spalte namens "lot_id" plotten möchte.Ich möchte jedoch, dass das Skript allgemein ist, damit ich nicht weiß, wie die "lot_id" im Voraus aussehen werden.Welche Werte also an "Where" übergeben werden, wird zur Laufzeit durch die tatsächlich in der Datentabelle vorhandenen lot_ids bestimmt.
Zuerst habe ich eine Liste aller lot_ids namens "listOfLotIDs" in der Datentabelle erstellt und den vernünftigen Ansatz ausprobiert.Das hat nicht funktioniert:
For( i = 1, i <= N Items( listOfLotIDs ), i++,
Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == listOfLotIDs[i] ));
);
Nach einiger Zeit kam ich zu der Überzeugung, dass mein Code nicht funktionierte, da der an die Funktion "Wo" übergebene Wert aus irgendeinem Grund mit in Klammern definiert werden muss tatsächliche Anführungszeichen - Sie können ihm nicht einfach eine String-Variable übergeben.Also habe ich eine andere Variante probiert:
For( i = 1, i <= N Items( listOfLotIDs ), i++,
sEval = "Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"" || listOfLotIDs[i] || "\!"))";
eval(Parse(sEval));
print("PRINT OUTPUT: " || sEval);
);
Ich glaube, die Funktion "parse" kompiliert ein JMP-Skript und die Funktion "eval" führt ein Stück kompiliertes JMP-Skript aus? Dies funktioniert jedoch AUCH nicht.Ich habe das print() des Strings eingefügt, nur um sicherzustellen, dass ich den String richtig zusammengestellt habe.Das sagt das Protokoll:
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFN00_E95029-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFN00_E95029\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFO00_E93847-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFO00_E93847\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFP00_E93981-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFP00_E93981\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFQ00_E95030-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFQ00_E95030\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFR00_E94699-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFR00_E94699\!"))"
Was in aller Welt ist also falsch?Wie wurden meine maskierten Anführungszeichen (\!) in Bindestriche "-" umgewandelt?!Bitte helfen Sie.
Übrigens behauptet das Forum, es habe "ungültiges HTML" aus meinem Nachrichtentext entfernt, aber Vorsicht, einige der Codes oder Fehlermeldungen könnten verstümmelt sein.
Hi,
Basierend auf der Fehlermeldung hängt das Problem möglicherweise mit der Struktur des fehlenden Werts in Ihrer Datentabelle zusammen und nicht mit der Where-Anweisung. Wäre es möglich, Ihre Daten oder eine Scheinversion Ihrer Daten zu teilen?
Am besten,
TS