Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
klu31415
Frequent Visitor

Calculating Sales After an Event using Two Tables

I was hoping someone would be able to help me with this. I currently have two separate tables each with the below values. What I want to do is calculate the sum of sales that occurred 60 days after the event date occurred for all item/store combinations. I'm struggling to get any DAX to take both columns into account.

 

Actions

  • Item
  • Store
  • Event Type
  • Event Date

 

Sales

  • Item 
  • Store
  • Date
  • Total Sales

 

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @klu31415,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
v-frfei-msft
Community Support
Community Support

Hi @klu31415,

 

I made one sample here for your reference. I created a measure as below.

 

Measure = CALCULATE(SUM(Sales[total sales]),FILTER(ALL(Sales),Sales[date]<=SELECTEDVALUE(Actions[Event date])+60 && Sales[date]>=SELECTEDVALUE(Actions[Event date])))

And here is the result.

 

Capture.PNG

 

For more details, please check the pbix as attached. If it doesn't meet your requirement, kindly share your samle data and excepted result to me.

 

https://www.dropbox.com/s/58v3v71t371cn7f/Calculating%20Sales%20After%20an%20Event%20using%20Two%20T...

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors