cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
mcstagger
Level III

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

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
KarenC
Super User (Alumni)

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

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.

View solution in original post

7 REPLIES 7
KarenC
Super User (Alumni)

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

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
Level III

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

That works! Thank you!

EDIT: Why are my posts being moderated?

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

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
Level III

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

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

Have a great weekend!

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

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 Community Manager

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

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

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

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