cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bcampbell2
Frequent Visitor

Return 3 Months of spend after a Date

I have a card that when you select a store from a slicer, I need it to show the first 3 months (or 90 days) of spend since the open date.

I have:

  • Total Spend Measure (contains spend before and after the Open Date)
  • Open Date
  • Store Name.

The Store Name and Open Date are in the same table. I've tried using DATESINPERIOD, but I keep using it incorrectly.

 

Thank You

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bcampbell2 , Try a measure like this with help from date table joined with open date

 


Rolling 3 = CALCULATE(sumX(values(Table[Store]), calculate(sum(Table[Spend Amount]))),DATESINPERIOD('Date'[Date ],Min('Table'[Open Date]),3,MONTH))

 

 

use base column for spend

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@bcampbell2 , Try a measure like this with help from date table joined with open date

 


Rolling 3 = CALCULATE(sumX(values(Table[Store]), calculate(sum(Table[Spend Amount]))),DATESINPERIOD('Date'[Date ],Min('Table'[Open Date]),3,MONTH))

 

 

use base column for spend

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

That Works!!!!

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!