Sorry, for asp the correct calculation is:
TotalPrice
(([Price] * [Quantity]) - (Abs([Quantity]>6 AND [category]="1")*(([Quantity]-6)*18)))
Savings:
([Price] * [Quantity]) - (([Price] * [Quantity]) - (Abs([Quantity]>6 AND [category]="1")*(([Quantity]-6)*18)))