Pre-calculated dataset after dropdown lists are filled

Hi,

My problem is the following:

I would like to define a data frame based on inputs from dropdown lists.

Once the dropdowns are filled, I would like to save the dataset in a variable in order to use it to generate different kind of graphs (depending on the value of on another dropdown).

To avoid performance issues and use of the same input parameters in callbacks again and again, is there a way to pre-calculate (save) the dataset before generating the graphs, once the dropdown lists are filled ?

A mini code example would be appreciated.

Thank you very much for your help.

Marco