Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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?

 

celenius_0-1661625447178.pngcelenius_1-1661625553902.png

 

Br,

 

Chris

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

 

celenius_0-1661680287390.png

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

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.

 

celenius_0-1661666557429.png

Br, Chris

Anonymous
Not applicable

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

 

celenius_0-1661680287390.png

 

Jeanxyz
Impactful Individual
Impactful Individual

@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)

data conversion.PNG

data converison2.png

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors