- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Filter by DateTime in Odata
Hi,
I would need to filter by the column "CalendarDateId" in an OData feed, but I can't the filter to work. For example records where CalendarDateId >= 08/01/2022. I've tried several formats and different yy-mm-dd separators ("/" or "." or "-"), nothing works. How should the filter be written?
Br,
Chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Found the solution, should be written like this "datetime'2022-08-01T00:00:00.000'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Jeanxyz
Due to the size of the data and the fact that it is very slow to do any transformations in Power Query, I would need to filter the data in the Odata -query.
Br, Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Found the solution, should be written like this "datetime'2022-08-01T00:00:00.000'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Anonymous It looks the dateIDs are already recognized by Power BI as dates, can you filter the date column in Power query?
If that doesn't work, you will need to format the dateID into correct format before you can filter the dates.
step 1. convert date type to Text, user Transform-replace query to replace ' 0.00.00' to blank
step 2. aftet that you should have the value in date format, select the whole column, right click and choose change type- using local, depending on the time format setup in your computer, you need to choose Date - English (United Kingdom) or English(United States)

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-09-2024 08:36 AM | |||
09-25-2024 11:08 PM | |||
12-20-2023 10:59 AM | |||
07-11-2024 03:45 PM | |||
08-08-2024 04:10 PM |
User | Count |
---|---|
121 | |
102 | |
88 | |
52 | |
46 |