Forum Discussion
Pikachu-Power
Impactful Individual
5 years agorestrict dataset for last year
hello all, i am not very familiar with the power query. in the import modus i load data from 01.01.2011, 01.02.2011... until 01.01.2021. but i want dynamicly start the load from the beginning of ...
- 5 years ago
Hi, Pikachu-Power
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Query1:
You may add a new step with the following m codes.
= Table.SelectRows(#"Renamed Columns",each let today = DateTime.LocalNow() in [Date]>=#date(Date.Year(today)-1,1,1) and [Date]<=Date.From(today) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-alq-msft
Community Support
5 years agoHi, Pikachu-Power
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Query1:
You may add a new step with the following m codes.
= Table.SelectRows(#"Renamed Columns",each
let today = DateTime.LocalNow()
in
[Date]>=#date(Date.Year(today)-1,1,1) and
[Date]<=Date.From(today)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.