You can create separate charts in 2 different sheets for category and subcategory respectively. Then use sheet swapping technique to show or hide a particular chart based on parameter selection on the dashboard.
Hope this helps.
Hi gopi duppati
Just following up.
If you have further questions, please reply here.
If this helped, please mark my answer as correct/helped to close the thread, not from inbox but from original post.