HI Anitha,
[Replace category with sub categories]
Follow the below steps:
1. Create a parameter for subcategory and add another option as All.
2. Now create a calculated field as below, [Replace category with sub categories]
3. Now drop the above field and sales to show data as wanted.
I used a simple visual as a table you can take as per use.
Hope it helps you!