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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

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

@Anonymous,

 

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.
Anonymous
Not applicable

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors