안녕하세요 -
저는 현재 궁극적으로 저를 위한 보고서를 표시할 스크립트를 작성하고 있습니다. 데이터 원본의 데이터가 업데이트될 때 그에 따라 이전의 모든 테이블/그래프를 새로 고칠 수 있지만 스크립트의 최종 테이블이 업데이트되지 않는 이유를 모르겠습니다(/* FINAL REPORT */ 레이블 지정). 데이터 원본에서 데이터를 가져올 수 있도록 줄이 누락되었습니까? 미리 감사드립니다!
Names Default To Here( 1 );
CumulativeData = Open(
"/Users/NAME/Desktop/JMP/Customer1_Data_05232018.xlsx",
Worksheets( "Cumulative_Data_Customer1" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2 ),
Data Starts on Column( 1 ),ho
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
);
FitLineGraph = CumulativeData << Bivariate(
Y( :Cumulative ),
X( :Day of year ),
Fit Where(
:Customer == "Customer1",
Fit Line( {Line Color( {212, 73, 88} )} )
)
);
CombinedTable = platform = Data Table( "Cumulative_Data_Customer1" ) <<
Bivariate(
Y( :Cumulative ),
X( :Day of year ),
Fit Where(
:Customer == "Customer1",
Fit Line( {Line Color( {212, 73, 88} )} )
)
);
Wait( 0 );
Report( platform )[Outline Box( "Bivariate Fit of Cumulative By Day of year" )][
Outline Box( "Linear Fit Customer==\!"Customer1\!"" )][
Outline Box( "Parameter Estimates" )][Table Box( 1 )] << Make Combined Data Table;
Report( platform ) << Close Window;
/* FINAL REPORT */
CampaignFulfillment = New Table( "Campaign Fulfillment",
Add Rows( 1 ),
New Script(
"Source",
Data Table( CombinedTable ) << Split(
Split By( :Term ),
Split( :Estimate ),
Sort by Column Property
)
),
New Script(
"Make Combined Data Table",
Names Default To Here( 1 );
platform = Data Table( "Cumulative_Data_Customer1" ) <<
Bivariate(
Y( :Cumulative ),
X( :Data per day ),
Fit Where(
:Customer == "Customer1",
Fit Line( {Line Color( {212, 73, 88} )} )
)
);
Wait( 0 );
Report( platform )[Outline Box( "Bivariate Fit of Cumulative By Day of year"
)][Outline Box( "Linear Fit Customer==\!"Customer1\!"" )][
Outline Box( "Parameter Estimates" )][Table Box( 1 )] <<
Make Combined Data Table;
Report( platform ) << Close Window;
),
New Column( "Customer", Character, "Nominal", Set Values( {"Customer1"} ) ),
New Column( "Data Guarantee",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 0 ),
Set Values( [3600] )
),
New Column( "Program Length Target",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 0 ),
Set Values( [365] )
),
New Column( "Data per day",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [9.90692146417355] )
),
New Column( "X",
Character,
"Nominal",
Hide,
Exclude,
Set Values( {"Day of year"} )
),
New Column( "Y",
Character,
"Nominal",
Hide,
Exclude,
Set Values( {"Cumulative"} )
),
New Column( "~Bias", Character, "Nominal", Hide, Exclude, Set Values( {""} ) ),
New Column( "Std Error",
Numeric,
"Continuous",
Format( "Best", 12 ),
Hide,
Exclude,
Set Values( [0.0596952471880355] )
),
New Column( "t Ratio",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 2 ),
Hide,
Exclude,
Set Values( [165.958295355868] )
),
New Column( "Prob>|t|",
Numeric,
"Continuous",
Format( "PValue", 12 ),
Hide,
Exclude,
Set Values( [4.75743232959739e-156] )
),
New Column( "Intercept",
Numeric,
"Continuous",
Format( "Best", 12 ),
Hide,
Exclude,
Set Values( [-96.5323780670815] )
),
New Column( "Estimated # at Target Date",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 0 ),
Formula( :Data per day * :Program Length Target )
),
New Column( "Delta to Target",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 0 ),
Formula( :Estimated # at Target Date - :Data Guarantee )
),
New Column( "Percent Deviation",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 0 ),
Formula( (:Delta to Target / :Data Guarantee) * 100 ),
Set Property(
"Color Gradient",
{{"Variance Evaluation", 16387, {{252, 0, 7}, {235, 255, 10}, {33, 224,
9}, {255, 248, 16}, {12, 108, 255}}, {0.00797872340425532,
0.247340425531915, 0.502659574468085, 0.726063829787234, 1}},
Range( {-10, 10, 0} )}
),
Color Cell by Value,
Set Selected
)
)스크립트에 오류가 있습니다.나는 당신이 CombinedTable의 정의를 원한다고 믿습니다.
CombinedTable=보고서(플랫폼).... <<결합 데이터 테이블 만들기;
생성 중인 데이터 테이블에는 JSL의 이 부분이 테이블 스크립트로 포함되어 있으므로 이 부분도 수정해야 합니다.
또한 데이터 테이블 CampaignFulfilment에서 고정 값을 사용하여 하나의 행만 정의했습니다. 데이터를 추가하거나 해당 테이블을 동적으로 만드는 JSL 코드가 없습니다.
스크립트가 수행할 것으로 예상되는 작업을 설명하십시오.
platform = Data Table( "Cumulative_Data_Customer1" ) <<
Bivariate(
Y( :Cumulative ),
X( :Day of year ),
Fit Where(
:Customer == "Customer1",
Fit Line( {Line Color( {212, 73, 88} )} )
)
);
Wait( 0 );
CombinedTable =Report( platform )[Outline Box( "Bivariate Fit of Cumulative By Day of year" )][
Outline Box( "Linear Fit Customer==\!"Customer1\!"" )][
Outline Box( "Parameter Estimates" )][Table Box( 1 )] << Make Combined Data Table;
Report( platform ) << Close Window;