cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

Linked subset with linked subset providing values to main table

What inspired this wish list request? 

Creating complicated formulas which would be extremely simple by being able to calculate them in subset.

 

 

What is the improvement you would like to see? 

Let us add formulas to linked subsets which would then provide the values back to the original table. If the row is not in linked subset all the values should be empty and otherwise they should be calculated based on the linked subset. We can do this basically without formulas, if we add index column and update values back to the main table but formulas makes it more visible what is being done.

 

Below is one example:

We wish to calculate cumulative sum of the last height of each age.

jthi_0-1729785384049.png

We can calculate it with a formula such as (which is unintended but one of the best formula features JMP has Make using formula expressions in Set Each Value and using expressions as first argument in Col stat... )

If(Row() == Col Max(Row(), :age),
	Col Cumulative Sum(If(Row() == Col Max(Row(), :age), :height, .))
)

jthi_1-1729785550317.png

Now if we were able to use this "linked subset reverse formula" we could take a subset of those values (many ways to do this). Just by having the formula in original table

Col Cumulative Sum(:height)

and looking at the preview, when we have link to original data table enabled, we can see that it calculates correctly (Column 7).

jthi_0-1729787038936.png

I would somehow like to be able to add this "subset" formula to my original table.

 

When I click OK, it reverts back to original values and calculates "incorrectly". This is bugged either in preview or in the subset. I would prefer to have it like this in subset BUT I think it would require some additional option added as it isn't same value anymore as you would find in the original table.

jthi_1-1729787071277.png

 

Currently I can create NON-LINKED subset with copy formula and then use update to add that back to my original table (first change column name) but this way there is no more indication how those values were calculated (unless I script the whole thing / use workflow for a bit clunky documentation)

jthi_4-1729785998273.png

 

Why is this idea important? 

Would make linked subset more useful and performing some calculations easier while still having them documented as formulas.

3 Comments
hogi
Level XII

I would somehow like to be able to add this "subset" formula to my original table ....

Though when I click OK, ...

 

click OK? in which dialog?

 

To get the column to the main table, actually, there is no need to use Update. As the Tables are linked, it's enough to drag the column there:


but like with Tables/Update: you will lose the formula behind it.

hogi
Level XII

How to document which subset has to be used to create the formula?

e.g. if a user executes dt << rerun formulas()

Status changed to: Acknowledged