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
Anonymous
Not applicable

sameperiodlastyear to todays date

I have an income table joined to a date table. I want to build a matrix that shows the total income to todays date and then also the total income for the same period last year. 

 

My income to todays date is a simple TOTALYTD calculation and it works fine. It shows the total income from 01/01/2021 to 17/05/2021 (i.e. today). However, my TOTALYTD for last year uses SAMEPERIODLASTYEAR but shows the income from the whole year, i.e. 2020. It does not just show 01/01/2020 to 17/05/2020. I understand that if I applied a filter to my matrix to restrict the income date to 01/01/2021 to todays date then the YTD-1 would show the correct period last year, but is there a way of getting the matrix to automatically restrict the YTD-1 to only go up to todays date, last year?

1 REPLY 1
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,
You can use PARALLELPERIOD:
PYTD= TOTALYTD(SUM(SALES),PARALLELPERIOD(DATE_COLUMN,-12,MONTH))

 

Please give a thumbs up if you find this useful and mark it as solution.
Thanks.

 

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.

Top Solution Authors