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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
herbemischung
Resolver I
Resolver I

Same Period Last Year for any random period (12.3.2018 - 4.2.2019 -> 12.3.2017 - 4.2.2018)

Hi,

 

once again, I have a task that I thought was easy and still can't get any further.

 

I have a slicer where I can enter any start and ending date.

Most of the time I want to know all sales data from fall to spring compared to the same period -1Year.

 

I used the measure: AJ = Sum(Salesdata[Sales]) and VJ = calculate([AJ];SAMEPERIODLASTYEAR(Salesdata[Date].[Date]))

I also tried Dateadd -1

 

Every time I got the same sales Amount AJ and VJ.

 

What am I doing wrong here?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Are your dates continuous? Also, use the date dimension instead of the sales table date.

You can also try

calculate([AJ];dateadd(Date.[Date],-1,year))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Are your dates continuous? Also, use the date dimension instead of the sales table date.

You can also try

calculate([AJ];dateadd(Date.[Date],-1,year))

Thanks, I had to add a time-table. It now works as I hoped it would!

 

all the best

herb

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.