위 행의 다른 열 값 평가를 기반으로 빈 셀 채우기안녕
다음과 같은 문제가 있습니다.
열 수준의 다음 n-1 값에 따라 "상위 목록" 열의 수식이나 스크립트를 통해 셀을 채우고 싶습니다.
빈 셀을 채웁니다("상위 목록" 열, 10행):
• 빈 셀이 있는 행에서 "4" 값을 포함하는 레벨 열로 이동합니다.
•n-1("3")을 계산합니다.
•n-1(3) 값이 포함된 위의 다음 행, 즉 9번 행을 찾습니다. Material 열의 문자(7P61G05)를 빈 셀(Parten List, Row 10)에 복사합니다.

그에 따라 모든 빈 셀을 채웁니다.
또한 다음과 같은 특별한 경우가 발생할 수 있습니다.
번호 매기기가 감소합니다. 셀에서 n-1 값이 있는 행을 계속 선택합니다.

누구든지 그 문제를 해결할 수 있기를 바랍니다! 미리 감사드립니다.
마티아스
고급 통계 모델링자동화 및 스크립팅데이터 혼합 및 정리Re: 위 행의 다른 열 값을 평가하여 빈 셀을 채웁니다.아래는 Jed와 약간 다른 방법을 사용하는 다른 아이디어입니다.
Names Default To Here(1);
// format data
dt = Open("$DOWNLOADS\Fill empty cells V2.jmp");
Column(dt, "Desired Column")[10::N Rows(dt)] = ""; // set empty values
Column(dt, "Desired Column") << Set Name("Parent List");
//Column(dt, "Parent List") << Set Each Value( I would suggest creation of new column
dt << New Column("ParentListFixed", Character, Nominal, << Set Each Value(
As Constant(
m_levels = :Level << get values;
m_materials = :Material << get values;
);
If(Is Missing(:"Parent List"n) & !Is Missing(:Level),
level_to_search = :Level - 1;
If(level_to_search > 0,
row_of_interest = Max(Loc(m_levels[1::Row()], level_to_search));
m_materials[row_of_interest];
,
"";
);
,
:"Parent List"n
);
));Re: 위 행의 다른 열 값을 평가하여 빈 셀을 채웁니다.친애하는 제드
좋습니다. 스크립트가 의도한 대로 완벽하게 작동합니다! 지원해 주셔서 정말 감사합니다. 이는 자재 추적을 위해 데이터에 액세스할 수 있는 형식으로 SAP 데이터를 제공하는 스크립트의 필수적인 부분이 될 것입니다. 이는 SAP에서 어려운 일입니다. 이전 스크립트를 사용하면 JMP가 널리 사용되기 때문에 이미 회사 내에서 상당한 인기를 얻게 되었습니다. 스크립팅 강좌에도 감사드립니다. 그것은 확실히 내가 더 잘 배우고 싶은 것입니다.
다시 한 번 감사드리며, 안부를 전합니다.
마티아스
Re: 위 행의 다른 열 값을 평가하여 빈 셀을 채웁니다.아, 이제 당신이 무엇을 찾고 있는지 더 잘 알 것 같아요. 다음은 업데이트된 스크립트와 무료로 제공되는 우수한 온라인 JMP 스크립팅 과정 링크
/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN. BY USING THE CODE, YOU AGREE TO THESE TERMS. YOUR USE OF THE CODE IS AT YOUR OWN RISK. JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose. The Code is designed to add functionality to the Software but has not necessarily been tested. Accordingly, JMP makes no representation or warranty that the Code will operate error-free. JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages. Except as otherwise provided above, the Code is governed by the same agreement that governs the Software. If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies.
*/
Names Default To Here( 1 );
dt = Current Data Table();
row()=10;
For Each Row(
dt,
If( Row() > 1,
n = row(); //temporary row variable for later
look_for_n = :Level[Row()] - 1; //find Level - 1
rows_with_n = dt << get rows where( :Level == look_for_n & row() < n ); //get all rows that match
last_n = rows_with_n[N Items( rows_with_n )]; //get the last of those rows
:Desired Column = Char( :Material[last_n] ); //put into desired column
)
);
Re: 위 행의 다른 열 값을 평가하여 빈 셀을 채웁니다.안녕하세요, 제드 님,
굉장해! 큰 지원에 정말 감사드립니다! 아직 작은 돈이 남아 있는데, 그것도 해결할 수 있을까요?
스크립트는 레벨 열에서 더 아래쪽에 있는 n-1 숫자를 찾는 것처럼 보이지만 마지막 n-1(이 경우에는 채워질 셀 이전의 레벨 "3")을 찾아야 합니다. 그래서 10~14행의 셀에 잘못된 문자가 입력되었습니다. 올바르게 채워진 셀을 볼 수 있도록 "올바른" 열을 만들었습니다.

스크립트는 해당 행 앞의 마지막 레벨 3의 "7P61G05" 대신 다음 레벨 3의 문자 "D9844"를 사용합니다.
jmp 테이블을 추가하겠습니다.
미리 감사드리며, 최선을 다해
마티아스
Re: 위 행의 다른 열 값을 평가하여 빈 셀을 채웁니다.내가 올바르게 이해하고 있다면 이 JSL은 여러분이 찾고 있는 작업을 수행해야 합니다.
/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN. BY USING THE CODE, YOU AGREE TO THESE TERMS. YOUR USE OF THE CODE IS AT YOUR OWN RISK. JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose. The Code is designed to add functionality to the Software but has not necessarily been tested. Accordingly, JMP makes no representation or warranty that the Code will operate error-free. JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages. Except as otherwise provided above, the Code is governed by the same agreement that governs the Software. If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies.
*/
Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
dt,
If( Row() > 1,
look_for_n = :Level[Row()] - 1; //find Level - 1
rows_with_n = dt << get rows where( :Level == look_for_n ); //get all rows that match
last_n = rows_with_n[N Items( rows_with_n )]; //get the last of those rows
:Desired Column = Char( :Material[last_n] ); //put into desired column
)
);
Re: 위 행의 다른 열 값을 평가하여 빈 셀을 채웁니다.네, 물론이죠. 감사합니다. "원하는 열" 열에서 "레벨! 열의 값에 따라 스크립트가 삽입해야 할 것으로 예상되는 "재료" 열의 셀을 복사했습니다.
Re: 위 행의 다른 열 값을 평가하여 빈 셀을 채웁니다.데이터 테이블과 올바른 값이 포함된 하나의 열을 제공할 수 있습니까?