cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

How to Cum Mean Row by Row

saitcopuroglu
Level IV

Hi all,

I have a column which displays the satisfaction percentage and I would like to have another column which takes the Cumulative Mean row by row. What is the script for it?

Many thanks in advance

8828_2015-05-23_14-12-23.png

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)


Re: How to Cum Mean Row by Row

New Column("Moving Average",

    Numeric,

    Formula(

        If(Row() == 1,

            :CUSTOMER SATISFACTION INDEX,

            (:Moving Average[Row() - 1] * (Row() - 1) + :CUSTOMER SATISFACTION INDEX) / Row()

        )

    )

);

View solution in original post

3 REPLIES 3
ms
Super User (Alumni) ms
Super User (Alumni)


Re: How to Cum Mean Row by Row

New Column("Moving Average",

    Numeric,

    Formula(

        If(Row() == 1,

            :CUSTOMER SATISFACTION INDEX,

            (:Moving Average[Row() - 1] * (Row() - 1) + :CUSTOMER SATISFACTION INDEX) / Row()

        )

    )

);

saitcopuroglu
Level IV


Re: How to Cum Mean Row by Row

Thank you!

saitcopuroglu
Level IV


Re: How to Cum Mean Row by Row

Hi MS,

Would you please show me how to add "by variable" to the script above?

CSI by Year,

CSI by Year by Agency

CSI By Year by Agency by Month...

Many thanks in advance