我不知道該怎麼稱呼它。也許表變量可以做到這一點。 也許預測分析器可以。
最後,我想要一個公式列 ABC 類,它是至少兩個我稱之為“全局參數”的結果。基本 ABC SKU 分類將臨界值設置為所有 SKU 集收入 %s 的總和。應該是收入的 80%,Bs 15% 和 Cs 5%。對於此示例,我將使其更加簡單,假設 SKU 按該 SKU 的銷售額分類為 A、B 或 C。
在下面的示例中,有三個規則(我沒有將其編碼為公式),由兩個參數設置。
- 銷量超過1000的SKU -> A
- 銷量超過100的SKU -> B
- 剩下的->C
示例數據表
//create datatable
dt = New Table( "Slider Test",
Add Rows( 26 ),
Set Header Height( 47 ),
New Column( "SKU",
Character,
"Nominal",
Set Selected,
Set Values(
{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
)
),
New Column( "Sales",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[98, 64, 120, 397, 93, 58, 196, 700, 674, 229, 607, 55, 590, 169, 1449,
1236, 143, 1714, 364, 404, 226, 1300, 1105, 144, 1391, 1893]
),
Set Display Width( 94 )
),
New Column( "ABC Class",
Character,
"Nominal",
Set Values(
{"C", "C", "B", "B", "C", "C", "B", "B", "B", "B", "B", "C", "B", "B",
"A", "A", "B", "A", "B", "B", "B", "A", "A", "B", "A", "A"}
),
Set Display Width( 70 )
)
);
//create graph
dt <<GRAPH builder=""></GRAPH>示例圖像。如果我可以為顯示的兩個變量鍵入或使用滑塊,那就太好了。
在下面的示例中,有三個規則(我沒有將其編碼為公式),由兩個參數(cutoff AB 和 cutoff BC)設置。
- 銷售額超過 1000 的 SKU -> A 然後我顯示結果將其更改為 1500
- 銷售額超過 100 的 SKU -> B 然後我顯示結果將其更改為 150
- 剩下的->C

謝謝你。
這個例子是一個巨大的幫助。在您的幫助下,我能夠完全實現我的想像。 謝謝你。
這是我為獲得多個滑塊並將全局框放在滑塊右側所做的工作。
//graph builder code above here (not shown)
//code for slider below
//number of months of demand variables
ab = dt:Cutoff AB;
bc = dt:Cutoff BC;
//CoV variables
CoV1 = dt:CoV1;
CoV2 = dt:CoV2;
:ABC Class << Suppress Eval( 0 );
specBox = H List Box(
V List Box(
//number of months of demand
H List Box(
Slider Box(
0,
12,
ab,
dt:Cutoff AB = ab;
dt << rerun formulas;
),
Text Box( "Months of demand" )
),
H List Box(
Slider Box(
0,
12,
bc,
dt:Cutoff BC = bc;
dt << rerun formulas;
),
Text Box( "Months of demand" )
),
//CoV
H List Box(
Slider Box(
0,
4,
CoV1,
dt:CoV1 = CoV1;
dt << rerun formulas;
),
Text Box( "COV" )
),
H List Box(
Slider Box(
0,
4,
CoV2,
dt:CoV2 = CoV2;
dt << rerun formulas;
),
Text Box( "COV" )
),
),//end V list box 1
//display the variables
V List Box(
Global Box( ab ),
Global Box( bc ),
Global Box( CoV1 ),
Global Box( CoV2 )
)//end V list box2
);//end H list box
(Report( gb )[Picture Box( 1 )] << Parent) << Append( specBox );

@BSwid ,使用 GraphBuilder 的圖形很複雜,因為動態組件太多,最好的方法取決於使用情況。例如,如果其他人要使用此圖,他們可以將 GraphBuider Summary Statistic for Sales 更改為 Max 或 MIn o Std Dev 而不是 Mean。換句話說,維護 GraphBuilder 的功能會增加複雜性。
如果這個匯總統計不是動態的,這可以通過在 GB 的 framebox 中添加一個自定義函數來實現。 這將需要計算每個截止值變化的平均值。並重繪圖表。 但是,如果排除了行,您將需要編寫一個行狀態處理程序腳本,以便計算您的特殊條。 此外,可以為 X-Group 等選擇另一列,然後動態滑塊界面可能會出現問題。
在使用 JMP 平台時,我更喜歡使用 JMP 的功能,即使它需要重組表來這樣做。為了讓 GB 繪製這些嵌套條,需要有一個變量來指定當前條,然後是推測條,這將用作疊加,條可以並排或嵌套。 從您的繪圖中,我選擇了嵌套,但是使用此腳本您可以更改它,
要重組數據,您需要 2 個副本,即原始值和推測值。 我選擇的方法是將表格與自身連接起來。 該腳本有一個假設,即當前分類來自腳本,如果不是,則需要修改定義的公式,並且可能需要一個新列。

附上3個文件:
- 原表, SKU 示例.jmp
- 修改表SKU Example_Final.jmp注意:創建交互式 GB 的腳本附在此表中
- 腳本, SKU 腳本.jsl從 c:\temp 打開原始表。您將需要修改您的路徑。此腳本重組表格 abd 繪製動態圖。
注意:創建一個動態自定義圖表可能更容易,它有一個固定的匯總統計數據,沒有其他需要維護的花里胡哨。 此方法用於記錄使用 GraphBuilder 編寫自定義動態小部件的腳本問題。
祝你好運。
@BSwid寫道:
我不知道該怎麼稱呼它。也許表變量可以做到這一點。 也許預測分析器可以。
最後,我想要一個公式列 ABC 類,它是至少兩個我稱之為“全局參數”的結果。基本 ABC SKU 分類將臨界值設置為所有 SKU 集收入 %s 的總和。應該是收入的 80%,Bs 15% 和 Cs 5%。對於此示例,我將使其更加簡單,假設 SKU 按該 SKU 的銷售額分類為 A、B 或 C。
在下面的示例中,有三個規則(我沒有將其編碼為公式),由兩個參數設置。
- 銷量超過1000的SKU -> A
- 銷量超過100的SKU -> B
- 剩下的->C
示例數據表
//create datatable
dt = New Table( "Slider Test",
Add Rows( 26 ),
Set Header Height( 47 ),
New Column( "SKU",
Character,
"Nominal",
Set Selected,
Set Values(
{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
)
),
New Column( "Sales",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[98, 64, 120, 397, 93, 58, 196, 700, 674, 229, 607, 55, 590, 169, 1449,
1236, 143, 1714, 364, 404, 226, 1300, 1105, 144, 1391, 1893]
),
Set Display Width( 94 )
),
New Column( "ABC Class",
Character,
"Nominal",
Set Values(
{"C", "C", "B", "B", "C", "C", "B", "B", "B", "B", "B", "C", "B", "B",
"A", "A", "B", "A", "B", "B", "B", "A", "A", "B", "A", "A"}
),
Set Display Width( 70 )
)
);
//create graph
dt <<GRAPH builder=""></GRAPH>示例圖像。如果我可以為顯示的兩個變量鍵入或使用滑塊,那就太好了。
在下面的示例中,有三個規則(我沒有將其編碼為公式),由兩個參數(cutoff AB 和 cutoff BC)設置。
- 銷售額超過 1000 的 SKU -> A 然後我顯示結果將其更改為 1500
- 銷售額超過 100 的 SKU -> B 然後我顯示結果將其更改為 150
- 剩下的->C

謝謝你。
我嘗試設置表變量:AB 和:BC。然後嘗試修改雞蛋和培根的例子來自 jsl 食譜。
但是當我嘗試移動滑塊時出現錯誤。

//use table variables instead :AB & :BC
//Eggs = 50; // :AB
//Bacon = 50; // :BC
//window
New Window( "Slider Display",
Border Box( Left( 10 ), Right( 10 ), top( 10 ), bottom( 10 ),
V List Box(
H List Box(
Text Box( "AB" ), // slider label
ABsb = Slider Box( 0, 2000, :AB, // slider script follows...
ABnb << set( :AB ); // update the value
// this example doesn't need any other interactive
// update. You could do some other work here, using
// the slider's value to change a graph, perhaps.
),
// text box to hold the slider's value...
ABnb = Number Edit Box( :AB, <<SETFUNCTION></SETFUNCTION>(我認為)我希望滑塊框更新表變量,從而更新數據表中的公式,從而更新圖表。
我確定我需要這條線。
gb<<INVAL></INVAL>
我嘗試設置表變量:AB 和:BC。然後嘗試修改雞蛋和培根的例子來自 jsl 食譜。
但是當我嘗試移動滑塊時出現錯誤。

//use table variables instead :AB & :BC
//Eggs = 50; // :AB
//Bacon = 50; // :BC
//window
New Window( "Slider Display",
Border Box( Left( 10 ), Right( 10 ), top( 10 ), bottom( 10 ),
V List Box(
H List Box(
Text Box( "AB" ), // slider label
ABsb = Slider Box( 0, 2000, :AB, // slider script follows...
ABnb << set( :AB ); // update the value
// this example doesn't need any other interactive
// update. You could do some other work here, using
// the slider's value to change a graph, perhaps.
),
// text box to hold the slider's value...
ABnb = Number Edit Box( :AB, <<SETFUNCTION></SETFUNCTION>(我認為)我希望滑塊框更新表變量,從而更新數據表中的公式,從而更新圖表。
我確定我需要這條線。
gb<<INVAL></INVAL>