generalledger
New member
- Joined
- Oct 15, 2016
- Messages
- 10
- Reaction score
- 0
- Points
- 0
- Location
- New Jersey, USA
- Excel Version(s)
- 2016
I am trying to dynamically control the range of years in my Date table. I currently have:
= Table.SelectRows(dbo_DateDimensionT, each [YearKey] >= 2013 and [YearKey] <= 2019)
I want the YearKey to be greater than or equal to the minimum year of dates in the column [Date] of the table PeriodDates that is in Power Query.
Also, the YearKey to be less than or equal to the maximum year of dates in the column [Date] of the table PeriodDates that is in Power Query.
It seems the solution should look something like:
= Table.SelectRows(dbo_DateDimensionT, each [YearKey] >= Year(Min(PeriodDates[Date])) and [YearKey] <= Year(Max(PeriodDates[Date]))
Of course this fails.
Thank you!!!
= Table.SelectRows(dbo_DateDimensionT, each [YearKey] >= 2013 and [YearKey] <= 2019)
I want the YearKey to be greater than or equal to the minimum year of dates in the column [Date] of the table PeriodDates that is in Power Query.
Also, the YearKey to be less than or equal to the maximum year of dates in the column [Date] of the table PeriodDates that is in Power Query.
It seems the solution should look something like:
= Table.SelectRows(dbo_DateDimensionT, each [YearKey] >= Year(Min(PeriodDates[Date])) and [YearKey] <= Year(Max(PeriodDates[Date]))
Of course this fails.
Thank you!!!