취소
다음에 대한 결과 표시 
표시  만  | 다음에 대한 검색 
다음을 의미합니까? 

Discussions

Solve problems, and share tips and tricks with other JMP users.
언어 선택 변환 막대 숨기기

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 채택된 솔루션

채택된 솔루션
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

원본 게시물의 솔루션 보기

4 응답 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!

추천 글