In the calcaulton settings, set it to be "based on items with a specific value"
for example:
Total of 'TotalPrice' where 'Category' has a value of '1' 'Times' '0.2'
That will apply a 20% discount on the subtotal of TotalPrice for items whose Category has a value of 1.