Hi Priya,
Follow below steps:
1. Click on Analysis - > Calculated field.
2. For suppose if you want to find sales for profit >100 and then display their sum of sales then,
IF [Profit] >2000 THEN [Sales]
ELSE O
END
3. This would give sales for only those whose profit >2000.
4. So similarly, you can group fields using condition and then perform aggregation using IF condition.
Hope this helps you.