Hide layer if the variable is empty

When you're at the dynamic slide, go to the layer window's Settings tab and use the Hide layer if provided variable is empty field to select a variable.

When the selected variable is empty, the layer will not show up.