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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alejandrofm
Helper II
Helper II

this step results in a query that is not supported in directquery mode

Hi, i'm trying direct Query but I'm receibing the subject error, is this query so complex that direct query can't parse this? 

 

---EDIT---

The query result has less than 20 rows and executes in less than 5 seconds

---END EDIT---

 

Select codigo,desc,fecha,motivo,

CAST(FLOOR( DATEDIFF(second,fecha,GETDATE()) /86400) AS VARCHAR(10))+'d ' +
    CONVERT(VARCHAR(5), DATEADD(SECOND, DATEDIFF(second,fecha,GETDATE()), '19000101'), 8),
	DATEDIFF(minute,fecha,GETDATE())
 tiempo
FROM
(
select test.codigo,desc,
convert(
	datetime, nullif(nullif(test.BEGDT, '00000000'), '99991231'))
                          + CAST(STUFF(STUFF(nullif(nullif(test, '000000'), '240000'), 5, 0, ':'), 3, 0, ':')
AS datetime) fecha,
SPERG as motivo
 from prd.ZIHIN006
 LEFT JOIN prd.test
 ON ZIHIN006.codigo=test.codigo
where ZIHIN006.ENDDT='99991231'
and SPERG NOT IN ('AISL','RES')
AND NBAU.ENDDT='99991231'
AND NBAU.LOEKZ=''
) a

Thank you!

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@alejandrofm,

 

You may take a look at https://docs.microsoft.com/en-us/power-bi/desktop-directquery-about#limited-data-transformations.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-chuncz-msft I looked into that but I'm still not sure how to adapt the query, currently there are no trasformations, only the "source" step. The query is fast.

Any idea?

Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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