In a retail environment, I have a cost associated with an Item/Offer that has a start and end date. By dividing the cost by the total number of days, I can get the per day cost of each product in each offer. How can I get the total cost of each item over a user entered date range? Keep in mind that this date range can span multiple offers and multiple offers may overlap for any given day.
For example, I have Item ABC. I have offers July 2016 and August 2016, which span the first to last day of each month. July 2016 has a per day cost of $100 for Item ABC and August 2016 has a per day cost of $50 for Item ABC. If the user wants to get the total offer cost for July 25th 2016 through August 10th , 2016 for Item ABC (7*$100 + 10*$50), what dax calculation should I use to get the total cost of $1,200 for the time period?