cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
%3CLINGO-SUB%20id%3D%22lingo-sub-87647%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87647%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%88%97%E8%96%AC%E7%89%A9%E3%81%A8%E7%B5%90%E6%9E%9C%E3%82%92%E6%8C%81%E3%81%A4%E8%96%AC%E7%89%A9%E3%81%A8%E3%81%84%E3%81%86%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E6%9C%80%E5%88%9D%E3%81%AE%204%20%E8%A1%8C%E3%81%A8%E6%AC%A1%E3%81%AE%204%20%E8%A1%8C%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%A6%E7%B5%90%E6%9E%9C%E5%88%97%E3%81%AE%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%82%92%E8%A8%88%E7%AE%97%E3%81%97%E3%80%81%E5%90%8C%E6%A7%98%E3%81%AB%E7%B6%9A%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%E3%80%82%20%E5%8F%82%E8%80%83%E3%81%BE%E3%81%A7%E3%81%AB%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%92%E8%BC%89%E3%81%9B%E3%81%A6%E3%81%8A%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-532174%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-532174%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EJMP%20%E3%81%AE%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%20%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AB%E3%81%AF%E3%80%81%E6%95%B0%E5%BC%8F%E3%81%AE%E5%AE%9A%E7%BE%A9%E6%96%B9%E6%B3%95%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E8%BF%BD%E5%8A%A0%E3%81%AE%E8%83%8C%E6%99%AF%E3%81%8C%E8%A8%98%E8%BC%89%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%20(%E5%BC%95%E6%95%B0%E3%81%AE%E5%AE%9A%E7%BE%A9%E3%81%A8%E3%80%81%E3%81%84%E3%81%8F%E3%81%A4%E3%81%8B%E3%81%AE%E5%84%AA%E3%82%8C%E3%81%9F%E5%B0%8F%E3%81%95%E3%81%AA%E4%BE%8B%E3%82%82%E5%90%AB%E3%81%BE%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99)%E3%80%82%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F16.2%2F%23page%2Fjmp%2Fstatistical-functions-2.shtml%23%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fja%2F16.2%2F%23page%2Fjmp%2Fstatistical-functions-2.shtml%23%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PatrickGiuliano_0-1660093800183.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PatrickGiuliano_0-1660093800183.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PatrickGiuliano_0-1660093800183.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F44691i32DEE1055F339075%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PatrickGiuliano_0-1660093800183.png%22%20alt%3D%22PatrickGiuliano_0-1660093800183.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E3%82%A6%E3%82%A3%E3%82%AD%E3%83%9A%E3%83%87%E3%82%A3%E3%82%A2%E3%81%A7%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%EF%BC%88%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMoving_average%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMoving_average)%3C%2FA%3E%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E8%A8%88%E7%AE%97%E3%81%AE%E8%83%8C%E5%BE%8C%E3%81%AB%E3%81%82%E3%82%8B%E7%AC%AC%E4%B8%80%E5%8E%9F%E7%90%86%E3%81%A8%E6%95%B0%E5%AD%A6%E7%9A%84%2F%E6%A6%82%E5%BF%B5%E7%9A%84%E3%81%AA%E7%90%86%E8%A7%A3%E3%81%AE%E8%A9%B3%E7%B4%B0%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105084%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105084%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%80%81%E3%81%93%E3%82%8C%E3%81%AF%E3%81%86%E3%81%BE%E3%81%8F%E3%81%84%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105083%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105083%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E9%87%8D%E3%81%BF%E4%BB%98%E3%81%91%20%3D%201%E3%80%81%E5%89%8D%20%3D%203%E3%80%81%3ADrug%20%E3%81%AF%E4%BD%95%E3%82%92%E6%84%8F%E5%91%B3%E3%81%97%E3%81%BE%E3%81%99%E3%81%8B%3F%3CBR%20%2F%3E%E5%BC%8F%E3%82%92%E8%AA%AC%E6%98%8E%E3%81%97%E3%81%A6%E3%81%84%E3%81%9F%E3%81%A0%E3%81%91%E3%81%BE%E3%81%99%E3%81%8B%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105082%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105082%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E3%81%93%E3%82%8C%E3%81%AF%E3%81%86%E3%81%BE%E3%81%8F%E3%81%84%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-88024%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-88024%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Moving%20average%20dialog.png%22%20style%3D%22width%3A%20373px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Moving%20average%20dialog.png%22%20style%3D%22width%3A%20373px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Moving%20average%20dialog.png%22%20style%3D%22width%3A%20373px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F15002i2532FCBB9DB58BDE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Moving%20average%20dialog.png%22%20alt%3D%22Moving%20average%20dialog.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E3%81%93%E3%82%8C%E3%81%AB%E3%82%88%E3%82%8A%E3%80%81%E5%BF%85%E8%A6%81%E3%81%AA%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%EF%BC%88%E5%89%8D%E5%BE%8C%204%20%E8%A1%8C%EF%BC%89%E3%81%8C%E5%BE%97%E3%82%89%E3%82%8C%E3%82%8B%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87746%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87746%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E5%85%AC%E5%BC%8F%E3%81%AF%E6%AC%A1%E3%81%AE%E3%81%A8%E3%81%8A%E3%82%8A%E3%81%A7%E3%81%99%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20Mod(%20Row()%2C%204%20)%20%3D%3D%200%2C%0A%20Mean(%20%3AResult%5BIndex(%20Row()%20-%203%2C%20Row()%20)%5D%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E6%95%B0%E5%BC%8F%E3%82%92%E5%90%AB%E3%82%80%E6%96%B0%E3%81%97%E3%81%84%E5%88%97%E3%82%92%E5%90%AB%E3%82%80%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%20%E3%83%87%E3%83%BC%E3%82%BF%20%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%92%E6%B7%BB%E4%BB%98%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22drugs.PNG%22%20style%3D%22width%3A%20512px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22drugs.PNG%22%20style%3D%22width%3A%20512px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22drugs.PNG%22%20style%3D%22width%3A%20512px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F15001i63F40F710CA32DDB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22drugs.PNG%22%20alt%3D%22drugs.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87744%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87744%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%B7%BB%E4%BB%98%E3%81%AE%E8%A1%A8%E3%81%AB%E7%A4%BA%E3%81%99%E3%82%88%E3%81%86%E3%81%AB%E3%80%814%E8%A1%8C%E3%81%94%E3%81%A8%E3%81%AB%E5%B9%B3%E5%9D%87%E3%82%92%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8B%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E5%88%97%E3%82%92%E7%94%9F%E6%88%90%E3%81%97%E3%81%9F%E3%81%84%E3%81%A8%E8%80%83%E3%81%88%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87743%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87743%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E7%B5%90%E6%9E%9C%E3%81%AE%E5%88%97%E3%81%AF%204%20%E3%81%A4%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%E3%80%82%E3%81%A4%E3%81%BE%E3%82%8A%E3%80%81%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%20%E3%83%87%E3%83%BC%E3%82%BF%20%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AB%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E8%A1%8C%E3%81%AE%E6%95%B0%E3%81%AE%204%20%E5%80%8D%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87741%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87741%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E3%81%93%E3%81%AE%E5%BE%8C%E3%81%AE%E6%AC%A1%E3%81%AE%E3%82%B9%E3%83%86%E3%83%83%E3%83%97%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E8%AA%AC%E6%98%8E%E3%81%97%E3%81%A6%E3%81%84%E3%81%9F%E3%81%A0%E3%81%91%E3%81%BE%E3%81%99%E3%81%8B%E3%80%82%E9%80%A3%E7%B6%9A%E3%81%99%E3%82%8B%204%20%E3%81%A4%E3%81%AE%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%81%AE%E5%B9%B3%E5%9D%87%E3%82%92%E8%A8%88%E7%AE%97%E3%81%97%E3%81%9F%E3%81%84%E3%81%AE%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87662%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87662%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%83%87%E3%83%BC%E3%82%BF%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AB%E6%96%B0%E3%81%97%E3%81%84%E5%88%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%80%81%E6%AC%A1%E3%81%AE%E5%BC%8F%E3%82%92%E9%81%A9%E7%94%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ECol%20Moving%20Average(%20%3AResult%2C%20weighting%20%3D%201%2C%20before%20%3D%203%2C%20%3ADrug%20)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87661%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87661%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%20%E3%80%81%3C%2FP%3E%3CP%3E%E6%95%B0%E5%BC%8F%E5%88%97%20--%26gt%3B%20%E8%A1%8C%20--%26gt%3B%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%82%92%E8%A9%A6%E3%81%99%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22moving.jpg%22%20style%3D%22width%3A%20908px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22moving.jpg%22%20style%3D%22width%3A%20908px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22moving.jpg%22%20style%3D%22width%3A%20908px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F14982i470944843464D147%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22moving.jpg%22%20alt%3D%22moving.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
jojmp
Level III

Moving Average

I have a table called drugs with columns drug and result, how do I calculate the moving average of the result column by taking the first 4 rows followed by the next 4 rows and similarly continue. Pfa the sample table for reference. 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Moving Average

The formula to use is

If( Mod( Row(), 4 ) == 0,
	Mean( :Result[Index( Row() - 3, Row() )] )
)

I have attached your example data table, with a new column with the formula in it

drugs.PNG

Jim

View solution in original post

11 REPLIES 11
gianpaolo
Level IV

Re: Moving Average

hello ,

you can try with Formula column --> row --> moving average

 

moving.jpg

Gianpaolo Polsinelli
jojmp
Level III

Re: Moving Average

Could you please explain the next step after this, I want to calculate the average of 4 consecutive samples
txnelson
Super User

Re: Moving Average

Do you have 4 columns of results, or 4 times as many rows as you show in your sample data table?
Jim
jojmp
Level III

Re: Moving Average

I want to generate the moving average column as shown in the attached table, for every 4 rows I need to calculate the average

txnelson
Super User

Re: Moving Average

The formula to use is

If( Mod( Row(), 4 ) == 0,
	Mean( :Result[Index( Row() - 3, Row() )] )
)

I have attached your example data table, with a new column with the formula in it

drugs.PNG

Jim
jojmp
Level III

Re: Moving Average

Thanks this worked
Phil_Kay
Staff

Re: Moving Average

Moving average dialog.png

I think this will give you the moving average that you want (4 rows before and 4 rows after).

jojmp
Level III

Re: Moving Average

this did not work
txnelson
Super User

Re: Moving Average

Create a new column in your data table, and apply the folloing formula

Col Moving Average( :Result, weighting = 1, before = 3, :Drug )
Jim