Forget about dynamic visibility, Create 3 query.
Query 1. Year & KPI
Query 2. Quarter & KPI with Year as a filter
Query 3. Month & KPI with Year & Quarter as a filter.
Use the trigger cell based on this selection, check out the below thread which basically holds the similar logic.
Difference between "When value Becomes & When value Changes"