I have a table named dt. I take the unique values of some columns and I create the following menu that gives the ability to the end user to filter the dt table based on the values of the columns and take a subset of this.

However, taking the unique values of its column is risky because you may end up choosing a combination of attributes that doesn't exist in the table.
Is there any way to make this menu interactive or dynamic so that it narrows down the available choices as the end user makes some choices?
In general, is there any way to handle this problem of ending up having an empty table because the initial dataset does not contain all the combinations of the unique values of the attributes?