Forum Discussion
Only show data form yesterday, error message
Hey Paritäa ,
you can use the Power Query Editor to filter the dataset, as example, I created a small table with today and yesterday rows:
then I've edited the query and added the date filter:
with this filter the today data is removed from the table.
Hope this works for you.
Cheers, LQ
I get the following error:
Expression.Error: The field 'date' of the record wasn't found.
A friend of mine said I should try with daytime but the same error appears...
- LQuedas3 years agoResolver II
Hey Paritäa ,
the field 'date' only exists in my example, you need to adapt the code to your situation, I don't know the names of your dataset's columns name.
Cheers, LQ
- Paritäa3 years agoFrequent Visitor
Hi LQuedas
I did change them. But is it correct that < #date, does not refer to the column, right?
- LQuedas3 years agoResolver II
Hey Paritäa
let's try step by step 🙂
1) I created a new dataset with a column named TimeStampDate that I want to filter
2) I added a filter to the TimeStampDate Column to load all the rows except today's rows
3) then I've edited the query with the advance editor
4) Finally, I Replaced the date #Date(2003,4,4) by the Year, Month and day of the UTCNow() function
Year - > Date.Year(DateTimeZone.UtcNow())
Month - > Date.Month(DateTimeZone.UtcNow())
Day - > Date.Day(DateTimeZone.UtcNow())
This change will make the filter dynamic depending on the UTC now date.
Hope this now makes sense to you.
Cheers, LQ