0

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?

Dave.Gugg
  • 6,561
  • 3
  • 24
  • 43
  • What is the structure of your model? Maybe there is a solution for this requeriment but it is hard to guess an expression that match your model. – alejandro zuleta Jul 25 '16 at 22:20
  • I have a order shipment fact table that contains the shipped date of the order line. This is the date that would match to the span of offer dates. Then I have an offer dimension table that contains the start and end date of each offer and the per day cost. It is linked to the fact table through a Offer key in a many to one relationship. – Dave.Gugg Jul 26 '16 at 13:26
  • Add some sample data – alejandro zuleta Jul 26 '16 at 15:18

0 Answers0