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

Measure Last year YTD with Sameperiodlastyear

Hello all,

 

Currently i want to create a new measure LYYTD for calculating the duration in our products.

 

 

LYYTD = CALCULATE([YTD];SAMEPERIODLASTYEAR('DATE'[DATE])LYYTD = CALCULATE([YTD];SAMEPERIODLASTYEAR('DATE'[DATE])

 

But the current issue is that i have a error which contains :

 

2017-04-13 15_19_49-.png

 

the current relationship between the table INCIDENT and DATE are:

 

2017-04-13 15_21_35-.png

 

 

What did i wrong?

 

Thank you!

 

R.

 

 

 

 

3 REPLIES 3
v-sihou-msft
Employee
Employee

@Anonymous

 

As the error messaged indicated, you must put a date column with "Contiguous" selection into SAMEPERIODLASTYEAR() function so that it can map the same date in last year. It means you need to put the contiguous dates in your visual, otherwise it will throw this error.

 

Regards,

Phil_Seamark
Employee
Employee

Hi @Anonymous

 

Have you tried setting the relationship direction back to single?

bidir.png

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Hello,

 

Yes i just made into a  Single but still no result in the column DURATIONMINUTESYTD Please take a look in the following image.

 

2017-04-19 13_34_16-Orakel Incident Insight V1.2 - Power BI Desktop.png 

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.