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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors