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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jdwalker5
Helper II
Helper II

BigQuery FORMAT_DATE and FORMAT_DATETIME Not Working in Power BI

Hello,

 

I'm trying to load a dataset from a BigQuery table and it fails if I use the FORMAT_DATE or FORMAT_DATETIME function in my query.

 

Query:

SELECT

  FORMAT_DATETIME('%Y/%d/%m', datetime_column)

FROM BQ_Table

 

Error:

Error.png

I confirmed the data type in the column is datetime.  I know that the issue is related to those functions because if I remove them the query works just fine.  I'm not sure if the functions themselves are not supported or if its related to the % character that is used within them...or something else entirely.

2 REPLIES 2
amitchandak
Super User
Super User

@jdwalker5 , on the step, you have the option to view the source query on right click. Open that and check if the right query is getting generated .

Also make sure you have written the query in the Advance option connection, and have not changed it manually on the advance editor of the power query, because that will not handle the special characters

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Appreciate the quick response, @amitchandak 

 

In this example I am building a blank report from scratch where this is the only connection, and I am indeed pasting my query into the advanced options window in the connection setup.

 

format_date.png

 

I think the issue is the special characters because I'm getting the same 'Invalid query' error when I use PARSE_DATE or PARSE_DATETIME.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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