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

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

Reply
officeiq
Helper I
Helper I

Error Message when attempting to use filter expression for automated calculation of prior month

I am attempting to create a paginated report that I can schedule to run on the 1st of every month without always putting in the date parameters. I am attempting to use a filter expression: 

'beginning of month

=DateSerial(Year(DateAdd("m", -1, Today())), Month(DateAdd("m", -1, Today())),1)

 

'End of month

=DateSerial(Year(DateAdd("m", -1, Today())),Month(DateAdd("m", -1, Today())), Day(DateAdd("d", -1, DateSerial(Year(Today()), Month(Today()), 1)) ) )


But get the followin Error: The processing of FilterExpression for the dataset 'Filtered' cannot be performed. Cannot compare data of types System.DateTimeOffset and System.DateTime. Please check the data type returned by the FilterExpression.

 

Any ideas what I can do to fix this?

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @officeiq ,

According to the error message, the problem is caused by data format differences,refer the following and check if it is helpful:

https://stackoverflow.com/questions/4331189/datetime-vs-datetimeoffset 

 

 

 

Best Regards

Lucien

Any idea how I could resolve this issue?

Helpful resources

Announcements
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.