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 September 15. Request your voucher.

Reply
JD_Khan
Frequent Visitor

Snowflake SQL Query with Power BI

Hi,

I am currently facing an issue while using Snowflake sql query as source data for my Power BI report.

I am using simple Select * From (my database_Table name_view name) but it throws the following error.

Unexpected error: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
Details:
Microsoft.Mashup.Evaluator.Interface.ErrorException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks ---> System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks ---> System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
at System.DateTime..ctor(Int64 ticks)
at System.DateTimeOffset..ctor(Int64 ticks, TimeSpan offset)
at Apache.Arrow.TimestampArray.GetTimestampUnchecked(Int32 index)


I am not sure why it is throwing an error. It works fine when run in Snowflake.

Any help would be appreciated.

Thank you

2 ACCEPTED SOLUTIONS
grazitti_sapna
Super User
Super User

Hi @JD_Khan 

Power BI Error: Invalid Timestamp Range
Power BI cannot handle timestamp values earlier than 01/01/0001 or later than 12/31/9999. If your view contains dates outside this range, you’ll encounter processing errors.
How to Fix It:
Option 1: Filter Out Invalid Timestamps in SQL
Update your Snowflake SQL query to exclude any date values that fall outside the supported range.

SELECT *
FROM your_view
WHERE your_timestamp_column BETWEEN '0001-01-01' AND '9999-12-31'

Option 2: Convert Timestamps to Strings (if date functionality isn't needed)

SELECT
  CAST(your_timestamp_column AS STRING) AS your_timestamp_column
FROM your_view

Option 3: Clean Data at the Source

If invalid dates occur regularly, consider one of the following:

  • Modify the view to return only valid timestamps.
  • Replace out-of-range values with NULL or a default acceptable date.

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

View solution in original post

V-yubandi-msft
Community Support
Community Support

Hi @JD_Khan ,

Thanks for contacting the Fabric Community.  In addition to @Akash_Varuna response, I recommend reviewing @grazitti_sapna  solution as well, it could be helpful for your scenario.

Please try the suggested approaches, and if you need further assistance, feel free to reach out.

If your issue is resolved, kindly mark the appropriate response as the Accepted Solution so it can help others facing a similar issue.

Regards,
Yugandhar.

View solution in original post

6 REPLIES 6
JD_Khan
Frequent Visitor

Thank you all for your responses. I found out that there is a Snowflake integration column from the source view which was the reason for this error. So I just skipped that column as I didn't need it. and it worked.

Hi @JD_Khan ,

Thanks for your response. If your issue is resolved, please consider marking it as the accepted solution this helps other community members find answers more easily.

 

Yugandhar,

CST Member.

V-yubandi-msft
Community Support
Community Support

Hi @JD_Khan ,

Thanks for contacting the Fabric Community.  In addition to @Akash_Varuna response, I recommend reviewing @grazitti_sapna  solution as well, it could be helpful for your scenario.

Please try the suggested approaches, and if you need further assistance, feel free to reach out.

If your issue is resolved, kindly mark the appropriate response as the Accepted Solution so it can help others facing a similar issue.

Regards,
Yugandhar.

grazitti_sapna
Super User
Super User

Hi @JD_Khan 

Power BI Error: Invalid Timestamp Range
Power BI cannot handle timestamp values earlier than 01/01/0001 or later than 12/31/9999. If your view contains dates outside this range, you’ll encounter processing errors.
How to Fix It:
Option 1: Filter Out Invalid Timestamps in SQL
Update your Snowflake SQL query to exclude any date values that fall outside the supported range.

SELECT *
FROM your_view
WHERE your_timestamp_column BETWEEN '0001-01-01' AND '9999-12-31'

Option 2: Convert Timestamps to Strings (if date functionality isn't needed)

SELECT
  CAST(your_timestamp_column AS STRING) AS your_timestamp_column
FROM your_view

Option 3: Clean Data at the Source

If invalid dates occur regularly, consider one of the following:

  • Modify the view to return only valid timestamps.
  • Replace out-of-range values with NULL or a default acceptable date.

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

Akash_Varuna
Super User
Super User

Hi @JD_Khan  Could you inspect timestamp columns in Snowflake for out-of-range values and filter them using WHERE timestamp_column BETWEEN '1753-01-01' AND '9999-12-31'? Cast problematic timestamp columns to VARCHAR in your SQL query to bypass incompatible ticks. Disable query folding in Power BI to ensure filtering or casting occurs in Snowflake before data import. Also, ensure Power BI and the Snowflake connector are updated to the latest versions for better compatibility.

Thank you @Akash_Varuna . I will give it a try.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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