cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
ankitgssingh
Level III

How do I get selected filters from JMP data filter and create a new columns based on that selection dynamically?

I have a jsl application to make a plot with a formula column in group by. The formula column has been created based on concatenating values from other columns based on filtered data. 

 

I want to generate the formula column dynamically and update it whenever someone selects a new category from the data filter. So if colA has two values Cat/Dogs and colB has two values tall/short. The formula column would be the concatenation of both colA and colB.  

 

When someone selects Cat (from colA) and short(from colB) the formula column should automatically get filled with "Cat_short" . 

 

When someone selects Dogs (from colA) and tall (from colB) the formula column should automatically get filled with "Dogs_tall" .

 

This way my formula column in the overlay of graph builder should update dynamically whenever someone selects a category using data filter. 

 

Thanks for helping on this. 

4 REPLIES 4
Ressel
Level VI

Re: How do I get selected filters from JMP data filter and create a new columns based on that selection dynamically?

Sounds demanding. Since I am not even a mediocre scripter, I can only point you into the direction of the 2022_Q1 Makeover Challenge of the JMP Scripters Club. Maybe Challenge C is pertinent to your problem?

Byron_JMP
Staff

Re: How do I get selected filters from JMP data filter and create a new columns based on that selection dynamically?

maybe you could accomplish this this using a local data filter?

 

Here's a graph where I can select multiple or single levels from one of three Item columns.

After selecting the options, then graph builder shows the selected statistic of the y-axis column to display.

 

Byron_JMP_0-1659619461591.png

 

JMP Systems Engineer, Health and Life Sciences (Pharma)
ankitgssingh
Level III

Re: How do I get selected filters from JMP data filter and create a new columns based on that selection dynamically?

Thank you for your answer. However this does not answer my question. 

 

If in your example, you create a categorical formula column based on the other columns. Add that formula column to the Overlay in graph builder. 

 

Q) Now if someone selects some other category in the data filter, the formula column should update and also the graph should update. 

 

Ressel
Level VI

Re: How do I get selected filters from JMP data filter and create a new columns based on that selection dynamically?

Having tried to better understand this problem, I think it is either too hard or just not well enough defined. 

 


@ankitgssingh wrote:

... The formula column has been created based on concatenating values from other columns based on filtered data. 


I am having an issue with the "based on filtered data". In the file you attached, the formula column is based on two other columns, :species and :season, but no filters are involved here. (But maybe that point is not important at all. Just felt I had to point out an incosistency.)

 


@ankitgssingh wrote:

... I want to generate the formula column dynamically and update it whenever someone selects a new category from the data filter. ...

When someone selects Cat (from colA) and short(from colB) the formula column should automatically get filled with "Cat_short" . 

 

When someone selects Dogs (from colA) and tall (from colB) the formula column should automatically get filled with "Dogs_tall" .


Why would you in this situation, i.e., when filtering, for example, in Graph Builder, want to make changes to your data table? Your column for :species contains two entries (FOX, COYOTE). Your column for :season contains four entries (fall, winter spring, summer). Having read the above description again and again, I still can't see anything else than a wish to overwrite the entire formula column with a string composed of the current filter settings. How would this column still be connected to the original data table?

 


@ankitgssingh wrote:

This way my formula column in the overlay of graph builder should update dynamically whenever someone selects a category using data filter. 

If you create just some plot from your table using Graph Builder and add :species as well as :season to the local data filters, while using the :Combined_Name column in the Overlay field, you will see that the legend is updated with the filter selection. (See screenshot below.)

Ressel_1-1659702737688.png

 

Based on the above screenshot example, I am therefore wondering what would be the benefit of filling up the formula column (:Combined_Name) with the filter selections made.