cancel
Showing results for 
Search instead for 
Did you mean: 
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
Microsoft
Microsoft

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.