Kirk P.
New member
- Joined
- Nov 4, 2016
- Messages
- 10
- Reaction score
- 0
- Points
- 0
- Location
- Minnesota USA
- Excel Version(s)
- 365
I thought this was a fairly straightforward date filter, but I'm getting this error: (step 'FilteredRowsTTM') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
let
myenddate = DateTime.Date(fnGetDateParameter("End Date")),
mystartdate = DateTime.Date(Date.AddYears(fnGetDateParameter("End Date"),-1)),
Source = qryDateRange_All,
FilteredRowsTTM = Table.SelectRows(Source, each [PeriodDate] >= mystartdate and [PeriodDate] < myenddate)
in
FilteredRowsTTM
The user supplies their desired "end date" as a parameter, and it counts back 1 year to retrieve a rolling 12 months. Help!
let
myenddate = DateTime.Date(fnGetDateParameter("End Date")),
mystartdate = DateTime.Date(Date.AddYears(fnGetDateParameter("End Date"),-1)),
Source = qryDateRange_All,
FilteredRowsTTM = Table.SelectRows(Source, each [PeriodDate] >= mystartdate and [PeriodDate] < myenddate)
in
FilteredRowsTTM
The user supplies their desired "end date" as a parameter, and it counts back 1 year to retrieve a rolling 12 months. Help!