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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Ricky_Zheng
Regular Visitor

Show Accumulative figure on daily basis of MTD last year

Hi,

I am trying to show accumulative sales figures both current month and same month in last year. But when I tried to use PARALELLPERIOD to get sales figure in last year it always shows the whole month on everyday in last year(see the red line)

Measure MTD LY = TOTALMTD([Net Sales];PARALLELPERIOD('Calendar'[Date];-12;MONTH))

Image 1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is not what I want, I want to show the accumulative figure on daily basis in last year like green line in following picture. the

black line is the sales figure until yesterday this month. report is refreshed on daily basis. Thanks!!!
Image 2.png

 

 

2 REPLIES 2
v-sihou-msft
Employee
Employee

@Ricky_Zheng

 

You should add the Previous Year filter within a CALCULATE() function. Please try the following formula:

 

MTD LY = CALCULATE(TOTALMTD(SUM('Calendar'[Amount]),'Calendar'[Date]),SAMEPERIODLASTYEAR('Calendar'[Date]))

 12.PNG

 

23.PNG

 

Regards,

hi Simon,

thanks, it works. but SAMEPERIODLASTYEAR only gives you the same period in last year, it is not suitable if it is not a completed month because I want the whole month sales in last year. I tried to fix it by using month flag as a slicer on report. thanks anyway! 🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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