Show the discount amount subtracted from subtotal in e-commerce?

I’d like to show the total discount subtracted from the subtotal during a user’s checkout process.

This article shows that it automatically shows that math, but it is not working in my case.

I have rebuilt the form multiple times. Wondering if this a custom code solution or I’m missing a setting of sorts?