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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors