I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
The disconnected table shown in the below is created by using Numeric range new parameter feature.
Value total: =
SUM( Data[Value] )
Last N days value total: =
VAR _Ndays = [LastNdays Value]
VAR _window =
ALL ( 'Calendar'[Date] ),
ORDERBY ( 'Calendar'[Date], ASC )
IF ( COUNTROWS ( _window ) >= _Ndays, CALCULATE ( [Value total:], _window ) )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Go to My LinkedIn Page