Forum Discussion

Benegade's avatar
Benegade
Regular Visitor
8 years ago
Solved

Linking tables on date

Hi, I am trying to create a report that shows the effect of advertising campaigns on products. i.e. how many units (or in my case, passengers booked) do we sell as the result of an advertising cam...
  • v-qiuyu-msft's avatar
    8 years ago

    Hi Benegade,

     

    Assume the sample data below: 

     

     

    You can create a measure like this: 

     

    Measure = CALCULATE(SUM('Bookings'[Pax]),FILTER('Bookings',IF(MAX('MarketingActivity'[Appearance Date])<='Bookings'[BookedDate],DATEDIFF(MAX('MarketingActivity'[Appearance Date]),'Bookings'[BookedDate],DAY),BLANK())<3 &&'Bookings'[Destination]=MAX('MarketingActivity'[Destination])))

     

    For more information, you can download attached pbix file. If it doesn't meet your requirement, please share some sample data with us and clarify corresponding results. 

     

     

    Best Regards,
    Qiuyun Yu