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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
yohanhwang
Frequent Visitor

Python Timestamp comparison error, but works in Jupyter notebook!

Hi all,

 

So I have the exact same python script running on Jupyter notebook, that will not run on Power BI. I have the screens side by side. Basically I'm trying to create a new column for Fiscal Year using a function with specific date ranges so that it grabs the date from the date column and if it is within a certain range, it will spit out the appropriate fiscal year. But only Power BI do I get the error:

TypeError: '>' not supported between instances of 'str' and 'Timestamp'

 

yohanhwang_0-1673388966810.png

 

Why would that be?

Thank you.

 

1 REPLY 1
lbendlin
Super User
Super User

please include the code rather than screenshots. They are too small to read.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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