Forum Discussion
Future dates displayed and should not be.
- 10 years ago
This is what I have
= Table.SelectRows(#"Renamed Columns1", each [Date] <= DateTime.LocalNow()
Sorry with all the questions.
The order_header table only pulls through order taken up to the present day, so there will never be orders on our system beyond the current days date.
The DimDate table is a static table up to end of 2020.
What I am unsure of is how to only import relevant dates which are relevant while reading the date table from source.
Thanks Craig
First I suppose that you use PowerBI Desktop or Excel. Go to the PowerQuery that import the Date table and then filter the Date column to be before or equal to a random date.
Then Open the advanced editor and change the date ( after the <= ) with the function
DateTime.LocalNow()
The format of date column must me Date/Time
Every time you refresh it should filter the dates till today
Hope that helps
- CraigBlackman10 years ago
Helper III
Ok, so as suggested i get this error.
Expression.SyntaxError: Token RightParen expected.
- konstantinos10 years ago
Memorable Member
You probably missed a parenthesis at the end
- CraigBlackman10 years ago
Helper III
This is what I have
= Table.SelectRows(#"Renamed Columns1", each [Date] <= DateTime.LocalNow()
- CraigBlackman10 years ago
Helper III
It's obviosu when you take a step back. Missed the extra ), so we are all now working as i'd like!
konstantinos thanks for the solution.
Thanks everyone else too!