'POWER PIVOT linear regression trendline for only last 3 dates

I'm trying to add a column to a power pivot table where it shows the trendline of only the last 3 dates. It's currently being done manually every week in a normal table, using the trend formula, where a chart reads the data. I've changed the data to be pulled into a power pivot table so that it can update automatically every week.

enter image description here

I know you can add a trendline to a graph automatically, but then it is calculated for all data points, not just the last 3. I've seen code and examples online to add trendlines with INTERCEPT and SLOPE but again that is for all data points. The graph shows 12 weeks, but only the last 3 should have a trendline that is based only on those 3 points.

example: enter image description here

I've got a column in the data model that identifies which lines of data falls within the last 3 weeks via TRUE or FALSE. The data in the data model is all files combined and identified by their weekending date, and the %'s are from calculations.

TIA



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source