Fields that are displayed depends on the selected item in dropdown

I was wondering if there is a better solution to this.

When option 1 is clicked, only one table is displayed but if option 2 is clicked, 2 tables are displayed.

enter image description here