cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-810200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFormula%20per%20verificare%20se%20uno%20qualsiasi%20degli%20elementi%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EJMP%20per%20Mac%3C%2FP%3E%3CP%3EVersione%2017.2.0%20(701896)%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EHo%20una%20colonna%20%22Dati%22%20con%20righe%20di%20numero_numero%20come%20questa%3A%3C%2FP%3E%3CP%3E1_3%3C%2FP%3E%3CP%3E3_7%3C%2FP%3E%3CP%3E6_5%3C%2FP%3E%3CP%3E...%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EVoglio%20testare%20questa%20colonna%20per%20vedere%20se%20alcune%20righe%20contengono%20valori%20da%20un%20elenco%20di%20valori%20e%20quindi%20contrassegnare%20o%20etichettare%20le%20righe%20che%20li%20contengono.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ESo%20che%20potrei%20costruire%20una%20formula%20elaborata%20come%20questa%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20%3ADie%20X_Y%20%3D%3D%20%223_9%22%20%7C%20%3ADie%20X_Y%20%3D%3D%20%223_4%22%2C%0A%091%2C%0A%090%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMa%20%C3%A8%20molto%20laborioso%20per%20lunghe%20liste%20di%20valori%20diversi%20da%20controllare.%20Vorrei%20solo%20poter%20incollare%20una%20lista%20di%20valori%20da%20controllare%20in%20una%20formula%2C%20delimitata%20da%20uno%20spazio%20o%20una%20virgola.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EHo%20trovato%20la%20funzione%20%22%20%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.2%2Findex.shtml%23page%2Fjmp%2Fcharacter-functions-2.shtml%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EContains%20Item%3C%2FA%3E%20%22.%20Funziona%20bene%20per%20un%20elemento%2C%20ma%20la%20voce%20di%20aiuto%20non%20offre%20alcuna%20indicazione%20su%20come%20costruire%20l'opzione%20%22list%22.%20Ho%20provato%20questo%20(specificando%20il%20delimitatore%20facoltativo%20come%20uno%20spazio)%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20Contains%20Item(%20%3ADie%20X_Y%2C%20%223_4%203_9%22%2C%20%22%20%22%20)%2C%0A%09%22exclude%22%2C%0A%09%22not%20exclude%22%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ee%20questo%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20Contains%20Item(%20%3AData%2C%20%223_4%2C3_9%22%2C%20%22%2C%22%20)%2C%0A%09%22exclude%22%2C%0A%09%22not%20exclude%22%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ECapisco%20che%20il%20delimitatore%20predefinito%20%C3%A8%20una%20virgola%2C%20ma%20volevo%20forzarlo%20per%20trovare%20qualcosa%20che%20funzionasse.%20Nessuna%20delle%20due%20funzioni%20Contains%20Item%20restituisce%20il%20comportamento%20ricercato%20(logico%201%20se%20c'%C3%A8%20una%20corrispondenza%2C%200%20in%20caso%20contrario).%20Se%20c'%C3%A8%20una%20funzione%20migliore%20da%20usare%2C%20per%20favore%2C%20consigliatemi.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EQuesto%20%C3%A8%20un%20problema%20generalizzato%20che%20vorrei%20riuscire%20a%20risolvere%3A%20ispezionare%20una%20colonna%20per%20trovare%20corrispondenze%20con%20lunghi%20elenchi%20di%20elementi.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EGrazie%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-810200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomazione%20e%20scripting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esistema%20operativo%20macOS%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%0A%20%0A%20%0A%20%20%3CLINGO-SUB%20id%3D%22lingo-sub-810365%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%0A%20%20%3CLINGO-BODY%20id%3D%22lingo-body-810365%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%0A%20%20%20%3CP%3EUn%20piacevole%20effetto%20collaterale%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%20Questa%20discussione%20mi%20ha%20fatto%20pensare%3A%3CBR%20%2F%3E%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3EContiene%3C%2FFONT%3E%20aumenta%20anche%20la%20velocit%C3%A0%20delle%20aggregazioni%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ECol..%3C%2FFONT%3E%20%3F%3C%2FP%3E%20%0A%20%20%20%3CP%3EE%20che%20ci%20crediate%20o%20no%2C%20lo%20fa.%20Wow%2C%20lo%20fa!!!!%3C%2FP%3E%20%0A%20%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot%2Fm-p%2F810363%2Fhighlight%2Ftrue%23M99287%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot%2Fmp%2F810363%2Fhighlight%2Ftrue%23M99287%3C%2FA%3E%20%3C%2FP%3E%20%0A%20%20%20%3CBR%20%2F%3E%20%0A%20%20%20%3CP%3EQualche%20idea%20sul%20perch%C3%A9%20il%20confronto%20tra%20i%20personaggi%20sia%20COS%C3%8C%20lento%3F%3C%2FP%3E%0A%20%20%3C%2FLINGO-BODY%3E%0A%20%0A%3CLINGO-SUB%20id%3D%22lingo-sub-810364%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810364%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ela%20lettura%20%C3%A8%3A%203%20argomenti%3C%2FP%3E%3COL%3E%3CLI%3Ex%20-%20una%20stringa%20di%20caratteri%3C%2FLI%3E%3CLI%3E3%20opzioni%3A%3CBR%20%2F%3E%20-%20elemento%20da%20cercare%3CBR%20%2F%3E%20-%20un%20elenco%20di%20diversi%20elementi%20-%20uno%20di%20essi%20corrisponde%3CBR%20%2F%3E%20-%20uno%20schema%20da%20ricercare%3C%2FLI%3E%3CLI%3Eargomento%20facoltativo%3A%20il%20delimitatore%20per%20dividere%20x%20in%20parole%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%20%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F12282%22%20target%3D%22_blank%22%3E%40datanaut%3C%2FA%3E%20ha%20scritto%3A%3CBR%20%2F%3E%3CP%3E%20Quindi%20(secondo%20la%20mia%20interpretazione%20semplicistica)%20sia%20x%20che%20%7Blist%7D%20potrebbero%20contenere%20le%20parole%20da%20ricercare%20o%20l'elenco%20di%20parole%20con%20cui%20confrontarle.%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E-%26gt%3B%20s%C3%AC.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CBLOCKQUOTE%3Einclusa%20una%20colonna%20come%20nell'esempio%20di%20Jarmo%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EPer%20una%20formula%20di%20colonna%2C%20questo%20%C3%A8%20sempre%20possibile%2C%20seguendo%20l'idea%3A%3CBR%20%2F%3E%20Per%20ogni%20riga%2C%20JMP%20prender%C3%A0%20automaticamente%20la%20voce%20della%20colonna%20nella%20rispettiva%20riga.%3CBR%20%2F%3E%20Quando%20si%20utilizza%20l'editor%20di%20formule%2C%20si%20esegue%20questo%20trucco%20ogni%20volta%2C%20ma%20senza%20accorgersene.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810361%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810361%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EGrazie%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%40jthi%3C%2FA%3E%20%2C%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2687%22%20target%3D%22_blank%22%3E%40txnelson%3C%2FA%3E%20%2C%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F26800%22%20target%3D%22_blank%22%3E%40hogi%3C%2FA%3E%20e%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58003%22%20target%3D%22_blank%22%3E%40mmarchandFSLR%3C%2FA%3E%20per%20le%20risposte%20e%20l'impegno%20profuso%20nel%20rispondere%20alla%20mia%20domanda.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJarmo%20ha%20trovato%20il%20mio%20problema%3A%20invertire%20la%20lista%20e%20l'elemento%20nella%20mia%20formula.%20Grazie%20per%20il%20pezzo%20di%20codice%20che%20illustra%20l'uso%20corretto.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Ere%3A%20%22Documentazione%20un%20po'%20carente%22%3CBR%20%2F%3E%20Sono%20d'accordo.%20Le%20istruzioni%20e%20l'esempio%20nell'indice%20di%20scripting%20mi%20sembrano%20un%20po'%20ambigui.%20Ecco%20la%20voce%20per%20l'indice%20di%20scripting%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%20%22%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%22%3EContiene%20l'oggetto%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Ex%3C%2FSPAN%3E%3CSPAN%3E%2C%20%26lt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Earticolo%3C%2FSPAN%3E%3CSPAN%3E%7C%20%7B%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Elista%3C%2FSPAN%3E%3CSPAN%3E%7D%20%7C%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Emodello%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%2C%20%26lt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Edelimitatore%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E...%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3EReturns%20a%20Boolean%20that%20indicates%20whether%20the%20word%20(%3CSPAN%20class%3D%22%22%3Earticolo%3C%2FSPAN%3E)%2C%20one%20of%20a%20list%20of%20words%20(%3CSPAN%20class%3D%22%22%3Elista%3C%2FSPAN%3E)%2C%20or%20pattern%20(%3CSPAN%20class%3D%22%22%3Emodello%3C%2FSPAN%3E)%20matches%20one%20of%20the%20words%20in%20the%20text%20represented%20by%20%3CSPAN%20class%3D%22%22%3Ex%3C%2FSPAN%3E.%20Words%20are%20delimited%20by%20the%20characters%20in%20the%20optional%20quoted%20delimiter%20(%3CSPAN%20class%3D%22%22%3Edelimitatore%3C%2FSPAN%3E)%20string.%20A%20comma%20is%20the%20default%20delimiter.%20Blanks%20are%20trimmed%20from%20the%20ends%20of%20each%20extracted%20word%20from%20the%20input%20text%20string%20(%3CSPAN%20class%3D%22%22%3Ex%3C%2FSPAN%3E).%3C%2FP%3E%3CP%3E%22%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EQuindi%20(secondo%20la%20mia%20lettura%20semplicistica)%20sia%20x%20che%20%7Blist%7D%20potrebbero%20contenere%20le%20parole%20da%20ricercare%20o%20l'elenco%20di%20parole%20con%20cui%20confrontarle.%20Qualche%20altro%20esempio%20che%20mostra%20alcune%20alternative%20che%20includevano%20una%20Colonna%20come%20nell'esempio%20di%20Jarmo%20potrebbe%20aiutare%20a%20chiarire.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EHo%20gi%C3%A0%20messo%20in%20pratica%20la%20soluzione!%20Grazie%20ancora.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810318%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810318%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAh%2C%20fantastico!%3CBR%20%2F%3E%3CBR%20%2F%3E%20All'inizio%20ho%20avuto%20un'esperienza%20piuttosto%20negativa%20con%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3EWhere()%3C%2FFONT%3E%20%2C%20ma%20non%20ricordo%20il%20motivo.%3CBR%20%2F%3E%20Forse%20ho%20usato%20una%20sintassi%20sbagliata%2C%20oppure%20il%20problema%20%C3%A8%20stato%20risolto%20nel%20frattempo...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810290%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810290%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPenso%20che%20valga%20la%20pena%20aggiungere%20che%20la%20funzione%20Where()%20%C3%A8%20molto%20pi%C3%B9%20veloce%20(%26gt%3B%20di%20un%20ordine%20di%20grandezza!)%20di%20%26lt%3B%20%3CSELECT%20where%3D%22%22%20or%3D%22%22%3E%26lt%3B%3CGET%20rows%3D%22%22%20where.%3D%22%22%3E%26lt%3B%26gt%3B%20I%20nomi%20predefiniti%20sono%20qui%20(1)%3B%20dt%20%3D%20Data%20Table%20(%22SATByYear%22)%3B%20Show%20(N%20Rows%20(dt))%3B%20%2F%2FN%20Rows%20(dt)%20%3D%2021245376%3B%20now%20%3D%20HP%20Time%20()%3B%20dt%20%26lt%3B%26lt%3B%20Select%20Where%20(%3AState%20%3D%3D%20%22Wisconsin%22%20%7C%3AState%20%3D%3D%20%22Alabama%22)%3B%20Wait%20(0)%3B%20total%20%3D%20HP%20Time%20()%20-%20now%3B%20Print%20(%22%26lt%3B%3C%2FGET%3E%3C%2FSELECT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMi%20dispiace%2C%20ho%20saltato%20un%20wait()%20nelle%20esecuzioni%20precedenti%2C%20che%20inverte%20la%20risposta%201...%20e%20porta%20a%20nuove%20possibilit%C3%A0%20per%20%233%2C%20%234%20e%20%235%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Ele%20nuove%20scoperte%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3EContiene%20elemento()%3C%2FFONT%3E%3CSPAN%3E%20%3C%2FSPAN%3E%C3%A8%20pi%C3%B9%20veloce%20con%20la%20sintassi%20di%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%40jthi%3C%2FA%3E%20-%20v2%20%C3%A8%20pi%C3%B9%20lento%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ESeleziona%20dove()%3C%2FFONT%3E%3CSPAN%3Ediventa%20molto%20pi%C3%B9%20veloce%20sostituendolo%20con%3C%2FSPAN%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Eottieni%20le%20righe%20where()%20%2B%20seleziona%20le%20righe().%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ESelect%20Where()%3C%2FFONT%3E%20diventa%20significativamente%20(!!)%20pi%C3%B9%20veloce%20sostituendo%20il%20confronto%20delle%20stringhe%20con%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Econtains%20item()%3C%2FFONT%3E%20.%3C%2FLI%3E%3CLI%3Ela%20combinazione%20di%20(2)%20e%20(3)%20%C3%A8%20abbastanza%20comparabile%3C%2FLI%3E%3CLI%3E...%20anche%20per%20set%20di%20dati%20pi%C3%B9%20grandi.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1731261697022.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731261697022.png%22%20style%3D%22width%3A%20330px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731261697022.png%22%20style%3D%22width%3A%20330px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70017i3B687F3FACA86149%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1731261697022.png%22%20alt%3D%22hogi_0-1731261697022.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EVedi%20altro...%3C%2FA%3E%3CNOSCRIPT%3E(Evidenziare%20per%20leggere)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0Await(0)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3CSELECT%20where%3D%22%22%3E%20%20%20names%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0Await(0)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3C%2FSELECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1731305493836.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731305493836.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731305493836.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70019i116F7A07829AD82B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1731305493836.png%22%20alt%3D%22hogi_0-1731305493836.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FP%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%3C%2FCODE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810228%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810228%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Eaggiunto%20a%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FTips-and-Tricks-best-practice-with-JMP-JSL%2Fm-p%2F662686%23U662686%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3ESuggerimenti%20e%20trucchi%20-%20best%20practice%20con%20JMP%2FJSL%3C%2FA%3E%3CBR%20%2F%3E%20%234%20%C3%A8%20sorprendente.%20Al%20momento%2C%20direi%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1731241802910.png%22%20style%3D%22width%3A%20684px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731241802910.png%22%20style%3D%22width%3A%20684px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731241802910.png%22%20style%3D%22width%3A%20684px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70011iB71AF709F9A7735D%2Fimage-dimensions%2F684x93%3Fv%3Dv2%22%20width%3D%22684%22%20height%3D%2293%22%20role%3D%22button%22%20title%3D%22hogi_0-1731241802910.png%22%20alt%3D%22hogi_0-1731241802910.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810225%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810225%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EGrazie%20per%20il%20commento.%3CBR%20%2F%3E%20scavando%20pi%C3%B9%20a%20fondo%2C%20in%20realt%C3%A0%20non%20%C3%A8%20%3CSTRONG%3E%22contiene%20elemento%22%3C%2FSTRONG%3E%20ma%20%3CSTRONG%3E%22Seleziona%20dove%22%3C%2FSTRONG%3E%20.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Ealcuni%20risultati%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3EContiene%20item()%3C%2FFONT%3E%20%C3%A8%20pi%C3%B9%20veloce%20con%20la%20sintassi%20inversa%20%22v2%22%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ESeleziona%20dove()%3C%2FFONT%3E%3CSPAN%3Ediventa%20molto%20pi%C3%B9%20veloce%20sostituendolo%20con%3C%2FSPAN%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Eottieni%20le%20righe%20where()%20%2B%20seleziona%20le%20righe().%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ESelect%20Where()%3C%2FFONT%3E%20diventa%20significativamente%20pi%C3%B9%20veloce%20sostituendo%20il%20confronto%20delle%20stringhe%20con%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Econtains%20item()%3C%2FFONT%3E%20.%3C%2FLI%3E%3CLI%3Ee%20combinando%20(2)%20e%20(3)%20diventa%20...%20un%20fattore%202%20pi%C3%B9%20lento%20di%20(2)%20(%3F!%3F!)%3C%2FLI%3E%3CLI%3Equindi%2C%20il%20vincitore%20(per%20questo%20set%20di%20dati)%20%C3%A8%20il%20n.%202%3A%3C%2FLI%3E%3C%2FOL%3E%3CP%3Ein%20totale%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_1-1731241317667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_1-1731241317667.png%22%20style%3D%22width%3A%20318px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_1-1731241317667.png%22%20style%3D%22width%3A%20318px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70010i802B20976A6FB607%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_1-1731241317667.png%22%20alt%3D%22hogi_1-1731241317667.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Edettagli%3A%3C%2FP%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EVedi%20altro...%3C%2FA%3E%3CNOSCRIPT%3E(Evidenziare%20per%20leggere)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3CSELECT%20where%3D%22%22%3Enames%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3C%2FSELECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%3C%2FCODE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHo%20eseguito%20alcuni%20test%20di%20temporizzazione%20confrontando%20la%20soluzione%20di%20Jarmo%20con%20la%20mia%20soluzione%20e%20la%20soluzione%20Contiene%20elemento%20%C3%A8%20spettacolarmente%20pi%C3%B9%20veloce%20della%20soluzione%20Seleziona%20dove.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810205%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810205%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EUsually%20in%20cases%20like%20this%20I%20tend%20to%20use%20Words()%20to%20split%20the%20string%20into%20a%20list%20and%20then%20compare%20using%20Contains()%20(or%20in%20some%20rare%20cases%20Contains%20Item()).%20But%20Contains%20Item()%20should%20also%20work%20and%20you%20just%20seem%20to%20have%20your%20parameters%20in%20incorrect%20order%3CCODE%20class%3D%22%20language-jsl%22%3E%3C%2FCODE%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENew%20Table(%22Untitled%22%2C%0A%09Add%20Rows(3)%2C%0A%09Compress%20File%20When%20Saved(1)%2C%0A%09New%20Column(%22Column%201%22%2C%20Character%2C%20%22Nominal%22%2C%20Set%20Values(%7B%221_3%22%2C%20%223_7%22%2C%20%226_5%22%7D))%2C%0A%09New%20Column(%22Column%202%22%2C%0A%09%09Character%2C%0A%09%09%22Nominal%22%2C%0A%09%09Formula(%0A%09%09%09If(Contains%20Item(%221_3%203_9%22%2C%20%3AColumn%201%2C%20%22%20%22)%2C%0A%09%09%09%09%22exclude%22%2C%0A%09%09%09%09%22not%20exclude%22%0A%09%09%09)%0A%09%09)%2C%0A%09%09Set%20Selected%0A%09)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_0-1731165057018.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1731165057018.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1731165057018.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F69998i2CF339F64E748A67%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_0-1731165057018.png%22%20alt%3D%22jthi_0-1731165057018.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESecondo%20esempio%20da%20Scripting%20Index%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_1-1731165235628.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_1-1731165235628.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_1-1731165235628.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F69999iA84B197CAF014387%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_1-1731165235628.png%22%20alt%3D%22jthi_1-1731165235628.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_2-1731165277236.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_2-1731165277236.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_2-1731165277236.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70000i70FDF9BF6918DBDD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_2-1731165277236.png%22%20alt%3D%22jthi_2-1731165277236.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eo%20JSL%20Syntax%20Reference%20contiene%20esempi%20accettabili%20%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F18.0%2F%23page%2Fjmp%2Fcharacter-functions-2.shtml%3Fos%3Dwin%26amp%3Bsource%3Dapplication%23ww6166335%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F18.0%2F%23page%2Fjmp%2Fcharacter-functions-2.shtml%3Fos%3Dwin%26amp%3Bsource%3Dapplication%23ww6166335%3C%2FA%3E%20ma%20la%20documentazione%20%C3%A8%20un%20po'%20carente.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810201%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Formula%20per%20verificare%20se%20un%20elemento%20di%20un%20elenco%20%C3%A8%20contenuto%20nelle%20righe%20di%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810201%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EEcco%20l'approccio%20che%20adotterei%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt%3Dcurrent%20data%20table()%3B%0A%0Adt%20%26lt%3B%26lt%3B%20clear%20select%3B%0A%0Afind%20%3D%20%7B%223_1%22%2C%224_4%22%7D%3B%0A%0Afor%20each(%20%7Bcompare%7D%2C%20find%2C%0A%09dt%26lt%3B%3CSELECT%20where%3D%22%22%3E%0AOnce%20the%20rows%20are%20selected%2C%20then%20excluding%2C%20deleting%20etc.%20can%20be%20done.%3C%2FSELECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
datanaut
Level III

Formula to check if any of a list of items is contained in the rows of a column

JMP for Mac 

Version 17.2.0 (701896)

 

I have a column "Data" with rows of number_number like this:

1_3

3_7

6_5

...

 

I want to test this column to see if some of the rows contain values from a list of values and then flag or label the rows which do.

 

I know I could construct an elaborate formula like this:

If( :Die X_Y == "3_9" | :Die X_Y == "3_4",
	1,
	0
)

But that's very laborious for long lists of different values to check.  I'd like to just be able to paste a list of values to check for in a formula, delimited by a space or comma.  

 

I found the function "Contains Item."  It works fine for one item but the help entry doesn't offer any insight on how to construct the "list" option.  I tried this (specifying the optional delimiter as a space):

If( Contains Item( :Die X_Y, "3_4 3_9", " " ),
	"exclude",
	"not exclude"
)

and this:

If( Contains Item( :Data, "3_4,3_9", "," ),
	"exclude",
	"not exclude"
)

I understand the default delimiter is a comma but wanted to enforce to find anything that works.  Neither Contains Item function is returning the sought-for behavior (logical 1 if there is a match, 0 if not).  If there is a better function to use please advise.  

 

This is a generalized problem I'd like to be able to solve -- inspecting a column to find matches with long lists of items.  

 

Thanks

 

15 REPLIES 15
hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

the reading is: 3 arguments

  1. x - a string of characters
  2. 3 options:
    - item to search
    - a list of several items - does one of them match?
    - a pattern to search
  3. optional argument: the delimiter to split x in words

 


@datanaut wrote:

So (to my simplistic reading) either x or the {list} could contain the words to be searched or the list of words to compare it with.  


-> yes.

 

 included a Column as in Jarmo's example 

For a column formula, this is always possible, along the idea:
For every row, JMP will take automatically the entry of the column in the respective row.
When you use Formula editor, you do this trick all the time - just without noting.

hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

A nice side effect:

This discussion made me think:
does Contains also increase the speed of Col .. aggregations?

And believe it or not - it does. wow, it does!!!!

https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot... 

 

Any clue why the character comparison is SOOO slow?

hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

I wondered if deleting rows without selecting them is much faster:

dt << select rows(myRows) << delete rows();
dt << delete rows();

[actually, I wondered why the corresponding << exclude(myRows) is missing.]

 

So, here is another speed test:

Names Default to here(1);
get timing = Function( {myExpr},
	dt = New Table( "test", add rows( 10000000 ), New Column( "rnd", set each value( Random Integer( 1000 ) ) ) );
	myRows = Random Shuffle( Index( 1, N Rows() ) )[Index( 1, N Rows() / 2 )];
	t0 = HP Time();
	myExpr;
//print(n rows()); // same timing without this line
	If( N arg( myExpr ) > 2,
		Print( Char( Head( Arg( myExpr, 2 ) ) ) || " + " || Char( Head( Arg( myExpr, 3 ) ) ) ),
		Print( Char( Head( Arg( myExpr, 2 ) ) ) );
	);
	Print( Char( (HP Time() - t0) / 1000000 ) || " s\!n" );
	Close( dt, noSave );
);

get timing( Expr( dt << select rows( myRows ) << delete rows ) );

get timing( Expr( dt << delete rows( myRows ) ) );

get timing( Expr( dt << select rows( myRows ) << exclude( 1 ) ) );

Print("-------------");

get timing( Expr( dt << select where( :rnd > 500 ) ) );

get timing( Expr( dt << get rows where( :rnd > 500 ) ) );

get timing( Expr( myRows = Where( dt, :rnd > 500 ) ) );

Print("_____________");
	

hogi_1-1764746400738.png

So,  deleting rows without selecting them is just marginally faster.
-> no wonder there is no corresponding function for Exclude.

hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

by the way:

Print("_________");
Print("__X______");
Print("X________");

hogi_2-1764747078244.png

why?

jthi
Super User

Re: Formula to check if any of a list of items is contained in the rows of a column

My guess is that Print is doing some parsing/evaluations as it is meant to be used for displaying values of arguments. And when you start -"variable" with two underscores it is considered hidden -> possibly some interaction with Print() to not make it leak those values.

-Jarmo
hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

show("__");
myString="__";
show(myString);
show("_"|| "_");

__x="secret";
show(__x);
show(name Expr(__x));
show(Eval(__x));

hogi_0-1764749234016.png

 

a second layer of ulra-tight protection ; )

Recommended Articles