Horizontal stacked bar chart with percentile label and count in tool tip

I need some quick help on this activity which i am trying to solve.
Here i have 3 columns Category, Sub-category, Gender. Where i have to show the percentage of Gender division and count of gender grouped by category or sub-category in horizontal stacked bar chart.
I am able to show the percentage in bar and count in tooltip only for category wise. I am unable to do it for sub-category when i switch to it.
I have used a calculated field as below under “Value field well”.

Calculated field:



You need to create the new calculation column based on sub-category average and add in you visual or show as tool tip.