アクション/スクリプトを組み合わせるこんにちは、
集計してデータテーブルにしてから、そのデータテーブルに基づいて計算指標を追加します。以下は私が今持っているものです(各アクションのスクリプトをコピーする)。データテーブルのアクションと新しい測定基準を組み合わせる方法がわかりません。事前に感謝、助けてください!
dt = Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table(
Analysis Columns(
:Name( "201733 Weekly COMP Store Sales" ),
:Name( "201833 Weekly COMP Store Sales" )
)
),
Row Table(
Grouping Columns( :Name( "18 IRI Market" ) ),
Add Aggregate Statistics( :Name( "18 IRI Market" ) )
)
)
);
dt << makeintodatatable;
dt << New Column( "ratio",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( :Name( "Sum(201833 Weekly COMP Store Sales)" ) / :Name( "Sum(201733 Weekly COMP Store Sales)" ) ),
Set Selected
);アクション/スクリプトを組み合わせるSummarize()を試してください。 また、あなたはTabulate Platformに "Invisible"パラメータを追加することができるので、実際の表示を見ることはありません。
アクション/スクリプトを組み合わせる簡単な質問:(Pythonのように)tabulate関数を置き換えるGroupby関数はJSLにありますか?
アクション/スクリプトを組み合わせるジムありがとうございます。
はいこれはまさに私が必要としているものです。tabulateによって生成された新しいデータテーブルの上に計算指標を追加します。どうもありがとう!アクション/スクリプトを組み合わせる下記のあなたのスクリプトへの私の変更の私のコメントを見なさい
dt = current data table();
// dt normally is a reference to a data table, as I have referenced
// in the statement above. The variable "tab", below, will refer to the
// tabulate platform
tab = dt << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table(
Analysis Columns(
:Name( "201733 Weekly COMP Store Sales" ),
:Name( "201833 Weekly COMP Store Sales" )
)
),
Row Table(
Grouping Columns( :Name( "18 IRI Market" ) ),
Add Aggregate Statistics( :Name( "18 IRI Market" ) )
)
)
);
// the dt2 variable will point to the new output data table
dt2 = tab << makeintodatatable;
// I am a little confused as to what data table you really want to
// add the new column to......I am changing the dt data tablereference
// to dt2, it is in the output data table that thes columns exist
dt2 << New Column( "ratio",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
:Name( "Sum(201833 Weekly COMP Store Sales)" ) /
:Name( "Sum(201733 Weekly COMP Store Sales)" )
),
Set Selected
);