Set to default app or refresh whole app

I want to solve the following problem

Step1- Dropdown1 (To select the dataset)
Step2- I get a chart from the selected dataset (Step1)
Step3- I do some calculation and get Baseline (Baseline Table)
Step4- Table(User input editable table) for simulation
Step5- Button to run simulation
Step6-Simulation Table
Step7-Dropdown2 (To display graph for selected KPI) and KPI column present in Simulation Table data(ie Step6)
Step8- Graph

So currently i am facing a problem ie… I run my simulation for data1 and then when i try to change my dataset (ie Step1) i get a error in display graph (ie Step8) because the variables of previous dataset are saved

So is there any way to solve this issue…or can where be any way to just refresh the layout to default with empty simulation table values or the default or the first state of the dashboard