式 - 最初の4年間の四半期の週平均こんにちは、
データは毎日表示されます(月 - 日)。 日付を曜日、週、月、四半期、年に変換しました。
Iamは、2015年1月1日から2015年10月3日までの期間の平均週間値を取得しようとしています。 これは2015年10月5日に表示され、それはその年の残りの間同じ値を含みます。
したがって、本質的には、第1四半期から第3四半期の1週間平均値です。
私はこれを表形式で行うことができると思いますが、私はこれを行う方法についての式を探しています。
任意の助けは大歓迎です。
ありがとうございました、
再:フォーミュラ - 最初の4分の3の年間平均週間絶対にします。
ご協力ありがとうございました再:フォーミュラ - 最初の4分の3の年間平均週間以下の各機能を利用して、それらをScripting Indexで調べて、それぞれの例について検討することをお勧めします。
ヘルプ==>スクリプトインデックス
これが私があなたに渡した公式の私の説明です
// Create a pointer to the data table so it can be referenced in the
// "Get Rows Where" function
dt = Current Data Table();
// The formula is applied to each row of the data table
// setting tYear equal to :Year sets the value of tYear to the
// Year for the current row. This is a little trick that allows
// for the "Get Rows Where" function to have something to compare to
tYear = :Year;
// For the current row, check to see if the current rows value of Date
// falls between January 1st and October 5th for the current year
If( Date MDY( 1, 1, :Year ) >= :date <= Date MDY( 10, 5, :Year ),
// If it is in between those dates then calculate the Mean of
// the column for Value where all the rows where Week is equal
// to the current row's value of week, and where all the rows where
// Year is equal to the current rows value of year
temp = Col Mean( :Value, :Week, :Year )
,
// If the current row's date isn't between the dates above, then
// find all of the rows where Week is equal to week 39, and year is
// equal to the row;'s current year. Then find the mean of those values
temp = Mean( :Value[dt << get rows where( :Week == 39 & tYear == :Year )] )
);
// The value that JMP returns to a formula is the last value exeuted in the formula
// Therefore, by placing the variable "temp" as the last thing seen, the
// calculated value of temp is what the formula value is
temp;再:フォーミュラ - 最初の4分の3の年間平均週間こんにちは、
私はJmpとその言語に不慣れです。あなたが私に尋ねても構わないのであれば、あなたがあなたがリストアップした式を通して私を歩かせてもらえますか。
Formulaは機能し、それが生成するのに必要なものを生成しましたが、私はそれを英語で理解しようとしています。
もう一度、ありがとうございました
再:フォーミュラ - 最初の4分の3の年間平均週間ありがとうございました、
結果は私が探していたものとは少し異なり(私はQ1-Q3からすべての週の平均対各週の平均を得ました)、それから私は公式によってもたらされた結果が実際に私が必要としているものと全く同じであることに気づきました。 私の最初の質問は変更されたはずです。
これであなたの助けに感謝します。
どうもありがとうございました。
あなたは私に多くの時間を節約しました
再:フォーミュラ - 最初の4分の3の年間平均週間これは私がうまくいくと信じているスクリプトです。......私は実際にそれをテストしませんでした、しかし私はあなたが概念を見るであろうと思います。 私が作った唯一の推測は、10月5日の週末の仕事でした。
dt = Current Data Table();
tYear = :Year;
If( Date MDY( 1, 1, :Year ) >= :date <= Date MDY( 10, 5, :Year ),
temp = Col Mean( :Value, :Week, :Year ),
temp = Mean( :Value[dt << get rows where( :Week == 39 & tYear == :Year )] )
);
temp;
再:フォーミュラ - 最初の4分の3の年間平均週間申し訳ありませんが、新しい年が始まると、第4四半期になるまで値に0を設定し、その年の新しいデータセットを使用してこのプロセスを繰り返すことになります。
ありがとうございました