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
pennyhoho117
Helper IV
Helper IV

Why some function such as DATE is not allowed as part in DAX expression on DirecQuery model

i write a calculate column as below:

last_es_call_log_date =
 VAR DateValue =es_request_loans[esn.send_notification_at] + TIME(8,0,0)
 RETURN
 DATE(YEAR(DateValue), MONTH(DateValue),DAY(DATEVALUE))
 
but return with error message:
Query(2,2) Function DATE is not allowed as part of calculated column DAX expression on DirecQuery model
 
Can any people tell me why?
2 ACCEPTED SOLUTIONS
Poojara_D12
Super User
Super User

Hi @pennyhoho117 

The error occurs because DirectQuery mode in Power BI has restrictions, and the DATE function cannot be used in calculated columns. DirectQuery pushes calculations to the data source, and some DAX functions (like DATE, TIME, DATEVALUE) cannot be translated into SQL queries.

 

please try the dax:

last_es_call_log_date = 
VAR DateValue = es_request_loans[esn.send_notification_at] + TIME(8, 0, 0)
RETURN INT(DateValue)

 

The best approach is to compute this column in your data source to keep the model in DirectQuery mode.

 

fabric-community-super-user-fy24-25.png

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

Hi @pennyhoho117, thank you for reaching out to the Microsoft Fabric Community Forum.

 

There isn't any official list detailing every unsupported function, but several commonly used functions are known to have restrictions or are unsupported in DirectQuery mode.

 

Please check out the below document for your reference:

DirectQuery in Power BI - Power BI | Microsoft Learn

 

If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.

View solution in original post

9 REPLIES 9
v-hashadapu
Community Support
Community Support

Hi @pennyhoho117 , Hope your issue is solved. If it is, please consider marking the answer 'Accept as solution', so others with similar issues may find it easily. If it isn't, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @pennyhoho117 , Hope your issue is solved. If it is, please consider marking the answer 'Accept as solution', so others with similar issues may find it easily. If it isn't, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @pennyhoho117 , Hope your issue is solved. If it is, please consider marking it 'Accept as solution', so others with similar issues may find it easily. If it isn't, please share the details. Thank you.

Poojara_D12
Super User
Super User

Hi @pennyhoho117 

The error occurs because DirectQuery mode in Power BI has restrictions, and the DATE function cannot be used in calculated columns. DirectQuery pushes calculations to the data source, and some DAX functions (like DATE, TIME, DATEVALUE) cannot be translated into SQL queries.

 

please try the dax:

last_es_call_log_date = 
VAR DateValue = es_request_loans[esn.send_notification_at] + TIME(8, 0, 0)
RETURN INT(DateValue)

 

The best approach is to compute this column in your data source to keep the model in DirectQuery mode.

 

fabric-community-super-user-fy24-25.png

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
v-hashadapu
Community Support
Community Support

Hi @pennyhoho117 , thank you for reaching out to the Microsoft Fabric Community Forum.

  1. Direct Query has restrictions on some DAX functions to ensure queries are compatible with the underlying data source. This includes Date function.
  2. One can restructure their calculated column formula to adhere to DirectQuery limitations, to avoid using unsupported functions.
  3. Here is a modifed version of your DAX expression:

last_es_call_log_date =

VAR DateValue = es_request_loans[esn.send_notification_at] + TIME(8, 0, 0)

RETURN

DATEVALUE(DateValue)

If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.

Besides Date function, may i know the DAX function/ format fields/M functions list that not allowed in Direct Query? Thanks

Hi , thank you for reaching out to the Microsoft Fabric Community Forum.

Below are some of the functions that do not work in Direct Query mode.

DATE Function: This function is not allowed in Direct Query mode.

PATH Function: This function cannot be used in Direct Query models.

LOOKUPVALUE Function: Not supported in Direct Query.

SUMX Function: Not supported in Direct Query.

CALCULATE Function: Limited support in Direct Query.

EARLIER Function: Restricted in Direct Query.

FILTER Function: Limited support in Direct Query.

ALL Function: Restricted in Direct Query.

ALLSELECTED Function: Restricted in Direct Query.

ALLEXCEPT Function: Restricted in Direct Query.

 If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.

any power bi documnet listed all Dax, M function that not allowed in Direct query?

Hi @pennyhoho117, thank you for reaching out to the Microsoft Fabric Community Forum.

 

There isn't any official list detailing every unsupported function, but several commonly used functions are known to have restrictions or are unsupported in DirectQuery mode.

 

Please check out the below document for your reference:

DirectQuery in Power BI - Power BI | Microsoft Learn

 

If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.

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.