Karlie here from the Shopify Support Team! What you could do is use a 'Fixed Amount' discount code for your customers. This would allow you to set up a rule for how many products the customer would need to buy to get that discount. You can use this guide to see how you can set up a Fixed Amount discount code for your customers. When setting up your discount code, it should look something like this - if you are wanting to do 3 for 45$. To get to the 45$ mark for your product discount, I would just recommend adding those 3 product prices together and then seeing how much you would need to subtract to get to $45.00, then you would just make your discount that value.
If that method doesn't work for you, then you could look into using an app. There are quite a few apps that would provide you with the type of discount functionality you're looking for. You can check out all of those apps, here. Specifically I would recommend checking out the apps; Volume & Tiered Discounts, Discount Box or Quantity Breaks & Discounts.
I hope this has answered your question. If not, or if you have any further questions please let me know. I will be happy to help!