포뮬러 - 주간 주 평균은 1 년에 3/4안녕하세요,
데이터는 매일 (mon - sat) 표시됩니다. 나는 날짜를 일, 주, 월, 분기, 일로 변환했다.
Iam은 2015 년 1 월 1 일부터 2015 년 10 월 3 일까지의 기간 동안 평균 주당 가치를 얻으려고합니다. 2015 년 10 월 5 일에 표시되며 나머지 연도에도 동일한 값이 포함됩니다.
본질적으로 Q1 - Q3에 대한 주간 평균 값입니다.
나는 이것을 표로 만들 수 있다고 생각하지만, 이것을하는 방법에 대한 공식을 찾고 있습니다.
어떤 도움이라도 대단히 감사하겠습니다.
고맙습니다,
다시 : 수식 - 주먹 주당 3 분기 평균 1 년물론 할 것이다.
모든 도움에 감사드립니다다시 : 수식 - 주먹 주당 3 분기 평균 1 년아래의 각 기능을 가져 와서 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;다시 : 수식 - 주먹 주당 3 분기 평균 1 년안녕하세요,
나는 Jmp와 그 언어에 익숙하지 않다. 내가 묻는 것을 꺼리지 않는다면, 당신이 열거 한 공식을 통해 나를 걸을 수 있습니까?
수식이 효과를 내고 생산해야하는 것을 생산했지만 영어로 이해하려고합니다.
다시 한 번 도움을 주셔서 감사합니다.
다시 : 수식 - 주먹 주당 3 분기 평균 1 년고맙습니다,
결과는 제가 찾고자했던 결과와 약간 다릅니다 (Q1 ~ Q3에서 매주 평균과 평균을 얻었습니다). 그리고 나서 공식에 의해 산출 된 결과가 실제로 필요한 것임을 깨달았습니다. 내 원래 질문이 변경되었을 것입니다.
이걸 도와 주셔서 감사합니다.
고맙습니다.
날 구했어.
다시 : 수식 - 주먹 주당 3 분기 평균 1 년제가 생각하기에 스크립트가 작동합니다 ...... 나는 정말로 테스트하지 않았지만 당신이 그 개념을 보게 될 것이라고 생각합니다. 제가 만든 유일한 추측은 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;
다시 : 수식 - 주먹 주당 3 분기 평균 1 년죄송합니다. 새해가 시작되는 것을 잊어 버렸습니다. Q4가 나올 때까지 가치가 0이되고 그 해의 새로운 데이터 세트로 프로세스가 반복됩니다.
고맙습니다