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
MrNoob
Helper II
Helper II

LTM compared side by side and YOY comparasion

I am trying to calculate the LTM and the previous periods LTM, however, i want to display them side by side.  Then calculate the YOY difference, displayed for the corresponding month.  I am using a Year and Month slicer.   My data is upto Feb 2018.  I want to display a dynamic rolling LTM line chart.  

 

The matrix best displays my issue.

 

SP.JPG

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @MrNoob,

 

What's the formula that you used? Seems you need a function SAMEPERIODLASTYEAR. Please share a sample, then we can provide more details of the solution.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is the code i am using in order of calculations. 


SP = ((([PAX]/[Bookings IND PAX])-([Bookings APM]/'Bookings Meassures'[Bookings IND PAX])))*100 LTM SP = CALCULATE ( [SP], DATESBETWEEN ( 'DATE'[Date], NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ('DATE'[Date]) ) ), LASTDATE ('DATE'[Date] ) ) ) LY LTM SP = CALCULATE([LTM SP],SAMEPERIODLASTYEAR('Date'[Date]))

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.