Normalization with a matching CriteriaHi,
I just started using JMP. I would really appreciate your help. I wanted to normalize the Cost factor to Jan value by Product matching criteria and add it to a Norm_Cost column.
Basically Product A needs be normalized by 100 and Product B by 25. What can i enter in the formula column or a jsl script ?
| Month | Prod | Cost | Norm_Cost |
| Jan | A | 100 | 1.00 |
| Feb | A | 102 | 1.02 |
| March | A | 105 | 1.05 |
| Jan | B | 25 | 1.00 |
| Feb | B | 27 | 1.08 |
| March | B | 23 | 0.92 |
Re: Normalization with a matching CriteriaI'm not the best scripter, but this should work as long as your data table is sorted by Month and Prod like your example table.
dt = Current Data Table();
dt << New Column("NormCost",
"Numeric",
"Continuous");
For( i=1, i <= N Rows(dt), i++,
If (:Month[i]=="Jan",
denom=:Cost[i];
:NormCost[i]=:Cost[i]/denom,
:NormCost[i]=:Cost[i]/denom
)
)