Subscribe Bookmark RSS Feed

JMP Formulas: Selecting Multiple Variables that are not Next to Each Other

mcstagger

Community Trekker

Joined:

Oct 6, 2014

I am trying to sum several variables together that are spread out across my data file. How do I select all of these variables without having to manually type them into the formula?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

So, I learned a new trick this week while reading the new JMP book Building Better Models with JMP Pro which makes adding formula columns so so easy.  If you right click on a column heading in your table there is a menu item "New Formula Column" and you can add a column with a formula based on the column you are selecting from with a single click.  I just tried this with multiple selected columns (not all together) in a data table, right click on one of them and select then NewFormulaColumn>Aggregate>Sum and you are done with the exception of perhaps renaming the column.

7 REPLIES
Solution

So, I learned a new trick this week while reading the new JMP book Building Better Models with JMP Pro which makes adding formula columns so so easy.  If you right click on a column heading in your table there is a menu item "New Formula Column" and you can add a column with a formula based on the column you are selecting from with a single click.  I just tried this with multiple selected columns (not all together) in a data table, right click on one of them and select then NewFormulaColumn>Aggregate>Sum and you are done with the exception of perhaps renaming the column.

mcstagger

Community Trekker

Joined:

Oct 6, 2014

That works! Thank you!

EDIT: Why are my posts being moderated?

jenkins_macedo

Community Trekker

Joined:

Jul 13, 2015

This is a public forum for JMP users and the post are moderate to make sure that information are credible, good for this forum scholarly platform, etc.

Jenkins Macedo
mcstagger

Community Trekker

Joined:

Oct 6, 2014

Ah, gotcha! Thought I may have offended someone with my elementary JMP questions.

Have a great weekend!

jenkins_macedo

Community Trekker

Joined:

Jul 13, 2015

Not really. It is good sharing ideas especially dealing with a software that provides so much potential on how I now see data analysis, visualization and predictive analytics. If you could, the San Diego Summit in a couple of weeks would be a great platform to each key individuals and other users. Have a wonderful weekend yourself.

Best

Jenkins Macedo
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

We are currently having a problem with spam posts in the JMP User Community, so all content is being moderated. We're working on updating the spam tools. With luck we'll be able to back off the moderation levels shortly.

BTW: Even my post is being moderated.

Jeff Perkinson

JMP Community Adminstrator

-Jeff
jenkins_macedo

Community Trekker

Joined:

Jul 13, 2015

This answer has already been answered, but the table > summary platform could be used to do that by assigning the sum under the statistics drop down menus and adding those to the statistics window and the category or sub-categories that you want each of the variables in the statistics windows to be grouped or sub-grouped by can go into the respect folders. In this example, Program Line is equal to the following: Intl, Dom, AF)

Data Table( "CRSVersion30-Enrollments-August-6th461838" ) <<

Summary(

  Group( :Mail Code ),

  Sum( :Name( "# Confirmed Enrollments" ) ),

  Sum( :Name( "# First Time Enrollments" ) ),

  Sum( :Name( "$ Confirmed Enrollments" ) ),

  Sum( :Name( "$ Program Only" ) ),

  Sum( :Name( "$ Total Enrollment Amt" ) ),

  Sum( :Name( "$ Total Net Order" ) ),

  Subgroup( :Program Line ),

  Freq( "None" ),

  Weight( "None" )

)

This script derived from running the procedure described above would generate a new table with the summary data table order in the form where:

Mail Code   N Rows  =Sum(# Confirmed Enrollments, Intl)  Sum( # First Time Enrollments, Intl)   Sum($ Confirmed Enrollments, Intl)  Sum($ Program Only, Intl)  Sum($ Total Enrollment Amt, Intl), Sum($ Total Net Order, Intl)  Sum(# Confirmed Enrollments, Dom)  Sum( # First Time Enrollments, Dom)   Sum($ Confirmed Enrollments, Dom)  Sum($ Program Only, Dom)  Sum($ Total Enrollment Amt, Dom), Sum($ Total Net Order, Dom) Sum(# Confirmed Enrollments, AF)  Sum( # First Time Enrollments, AF)   Sum($ Confirmed Enrollments, AF)  Sum($ Program Only, AF)  Sum($ Total Enrollment Amt, AF), Sum($ Total Net Order, AF).

You could also use Transpose under table

Jenkins Macedo