! !Hi Anil,
There are many ways for this:
1. Use drill and take Product Group on the top and follow your hierarchy for the other fields.
2. Alternative: Put Product Group n the top into alternative hierarchy.
3. I am attaching an extension which has name Variable with a sample variable extension app. Please try to replicate the sample app with your fields you will get your solution.
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.