cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

Change to find percent change from 2012 to 2022

Good afternoon -- I'm working on a dataset that has the number of applicants to different columns.  I previously asked how to get the yearly percent change for a number of applicants.

 

I would now like to just get the percent change from 2012 to 2022.  I have tried a lag column and also modifying the numbers in the formula in the current column that calculates percent change, but I can't seem to figure it out.  I appreciate the help in advance.  Also, I've been trying to find what the numbers 1,1,0,1 reference as I think that has to do wth the solution, but can't find it.  Thanks!

 

AdditiveOwl2917_0-1706385184318.png

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Change to find percent change from 2012 to 2022

Are you trying to find the change between first year and last year or specifically 2012 and 2022?

-Jarmo

View solution in original post

jthi
Super User

Re: Change to find percent change from 2012 to 2022

Depending on the assumptions which can be made (is ordered by year / do you want first vs last year) there are different solutions. Below is one option for 2012 vs 2022

	Col Sum(If(:Year == 2012, :Applicants total, ., ), :Institution name)
	/ 
	Col Sum(If(:Year == 2022, :Applicants total, ., ), :Institution name)

 

-Jarmo

View solution in original post

txnelson
Super User

Re: Change to find percent change from 2012 to 2022

Expanding on Jarmo's solution, you may only want the 2012 to 2022 change to be displayed in the 2022 rows

txnelson_0-1706415529913.png

The formula for this is

If( :Year == 2022,
	Col Sum( If( :Year == 2012, :Applicants total, . ), :Institution name ) /
	Col Sum( If( :Year == 2022, :Applicants total, . ), :Institution name ),
	.
)
Jim

View solution in original post

4 REPLIES 4
jthi
Super User

Re: Change to find percent change from 2012 to 2022

Are you trying to find the change between first year and last year or specifically 2012 and 2022?

-Jarmo
jthi
Super User

Re: Change to find percent change from 2012 to 2022

Depending on the assumptions which can be made (is ordered by year / do you want first vs last year) there are different solutions. Below is one option for 2012 vs 2022

	Col Sum(If(:Year == 2012, :Applicants total, ., ), :Institution name)
	/ 
	Col Sum(If(:Year == 2022, :Applicants total, ., ), :Institution name)

 

-Jarmo
txnelson
Super User

Re: Change to find percent change from 2012 to 2022

Expanding on Jarmo's solution, you may only want the 2012 to 2022 change to be displayed in the 2022 rows

txnelson_0-1706415529913.png

The formula for this is

If( :Year == 2022,
	Col Sum( If( :Year == 2012, :Applicants total, . ), :Institution name ) /
	Col Sum( If( :Year == 2022, :Applicants total, . ), :Institution name ),
	.
)
Jim

Re: Change to find percent change from 2012 to 2022

Thank you all -- that worked great.  I'm just getting into JSL, so your examples are incredibly helpful.  Thanks!