cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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!

Recommended Articles