Forum Discussion
Combining dynamic date filter in Power Query (import) with date conversion
- 5 years ago
Hello Anonymous
Check out this dynamic solution. Use this output as input in your Cube-parameter
let Yesterday = Date.AddDays(Date.From(DateTime.FixedLocalNow()),-1), Year = Text.From(Date.Year(Yesterday)), Month = "0" & Text.From(Date.Month(Yesterday)), Day = "0" & Text.From(Date.Day(Yesterday)), Final = Year & Text.End(Month,2) & Text.End(Day,2) in FinalCopy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy - 5 years ago
Hello Anonymous
where is this error caused? Did you input my code into the blank query? And it's the name "Query1"?
If you can answer both questions with yes, then this error is caused by something else. Maybe somewhere else in your code you are using a variable without definition.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello Anonymous
where is this error caused? Did you input my code into the blank query? And it's the name "Query1"?
If you can answer both questions with yes, then this error is caused by something else. Maybe somewhere else in your code you are using a variable without definition.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hi Jimmy801 , you're right, there was something wrong with my code. I re-did it and now it works. Thanks again!