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
dedelman_clng
Community Champion
Community Champion

simplest of queries results in "step results in a query not supported in DirectQuery mode"

I have a single query against a single table, and I am getting the error "This setp results in a query that is not supported in DirectQuery mode." I do not understand what the issue might be.

 

The data source is a SQL Server Cluster (2014), and I am selecting all columns from a single table. The Query Editor code is this (actual names replaced with "myserver"/"mydb"/"my_table"):

 

let
    Source = Sql.Database("myserver", "mydb"),
    dbo_my_table = Source{[Schema="dbo",Item="my_table"]}[Data]
in
    dbo_my_table

I am on Version: 2.71.5523.941 64-bit (July 2019). This is a table, not a view, so there shouldn't be any underlying complex code.

 

Any help appreciated.

Thanks

David

1 ACCEPTED SOLUTION

Hi @parry2k -

 

You are correct.  Here are the steps with screen shots to show what I'm doing:

1) New report, Get Data -> SQL Server

1.png

 

2) Enter server and db name, select "Direct Query", press OK

2.png

 

3) Choose the table I want and click "Edit"

 

3.png

 

4) In the query editor, highlight the "Source" step and see the error message

4.png

 

That's all I am doing. 

 

ETA: once I hit "Close and Apply" it says that the table is in Direct Query mode, and when I publish it to the service it has the data cache refresh option. The reason I had gone on this path in the first place is that a report I had created I thought was Direct Query but it didn't have the correct options in the service. It had the same error message as creating the connection in a new report, so I thought it might be connected. Maybe the other one got corrupted or something.

 

ETA2: Going through different iterations, it looks like the presence of CALENDARAUTO() in the report is what kept that dataset from acting like Direct Query and giving the correct refresh options. Still odd that the error message appears in the Query Editor like that. Thanks for reading my post and getting me to do more investigation on my side.

 

Thanks

David

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@dedelman_clng so you are saying these are the only steps in your power query, and you are using direct query to get data from sql and you are getting error message. this doesn't make sense. Can you confirm on steps?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k -

 

You are correct.  Here are the steps with screen shots to show what I'm doing:

1) New report, Get Data -> SQL Server

1.png

 

2) Enter server and db name, select "Direct Query", press OK

2.png

 

3) Choose the table I want and click "Edit"

 

3.png

 

4) In the query editor, highlight the "Source" step and see the error message

4.png

 

That's all I am doing. 

 

ETA: once I hit "Close and Apply" it says that the table is in Direct Query mode, and when I publish it to the service it has the data cache refresh option. The reason I had gone on this path in the first place is that a report I had created I thought was Direct Query but it didn't have the correct options in the service. It had the same error message as creating the connection in a new report, so I thought it might be connected. Maybe the other one got corrupted or something.

 

ETA2: Going through different iterations, it looks like the presence of CALENDARAUTO() in the report is what kept that dataset from acting like Direct Query and giving the correct refresh options. Still odd that the error message appears in the Query Editor like that. Thanks for reading my post and getting me to do more investigation on my side.

 

Thanks

David

Hi @dedelman_clng 
I have exactly this issue, what was your solution?

thank you

Hi @LauraMay - this was long ago, but I believe that I brought in a calendar from SQL instead of using CALENDARAUTO() and it allowed DirectQuery to work properly.

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.