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

Import dataset shows as direct query in service

Hi guys

I've spent months on a complex dataset that uses two SQL Sources and some web sources (excel sheets on OneDrive). Now upon testing I see that the Power BI Service detects the dataset to be in directquery mode rather than import. The scheduled refresh option is not showing, instead it gives me the option the schedule a cache refresh. So here's what I've tried so far:

- Check all queries and all of them are set to import (the other options in the dropdown in the modelling area aren't even available in Power BI Desktop).

- Saved the PBIX as a new file, with a new name and into another workspace. Same result.

- Disabled all preview features, saved the PBIX again. Same result.

- Renamed the PBIX to a ZIP file and checked the DataMashup and Metadata files. There's no evidence that the files are any different from a dataset that is running normally in import. "IsDirectQuery" is always followed by Value=10, which seems to be correct (what I fathomed from comparing my problem report with one that is running normally).

 

I know that probably the best way to solve this is to create the report from scratch. But that would mean a lot of work especially since there are roughly 50 bookmarks and plenty of measures that I would need to create again.

 

Does anybody konw what elese could be tried so that the dataset is detected correctly? Anybody know how to read the content of the zip? Or anyone with a trick on how I can recreate the report the most efficient way?

Thanks a lot for the help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Seems like I was able to solve the problem and it was somewhat connected to the RangeStart and RangeEnd Parameters set up in my datamodel. Only taking them out of filter statements in the actual queries on PowerQuery did not suffice. I had to delete the two parameters alltogether.

Also, I followed the advice to take another source into the sane datamodel as a direct query source. Apply the query changes, and then delete it again afterwards.

 

Hopefully this will help when someone else faces the same issue.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous,

It sounds like your data source is pointed to the excel file which you publish to one drive side instead of mapping to the root database tables.

Data refresh in Power BI 

For this scenario, power bi service will trace your excel file and use onedrive and online refresh to handle your report. (notice: The refresh triggered when you excel file contents changes. In fact, the excel file who stored online not able to automatically update itself so these refreshes should not be triggered or refresh without new data updated)

After finished reading your description, I think you should try to connect to power bi data model(it is a SSAS instance with tabular mode) and try to use SQL server related tools to change the connection mode. (for Datasource mapping, you can do modification on query editor side)

connect to power bi desktop model from excel and ssms 

DirectQuery mode in tabular models 

BTW, you can also take a look at following blog if it helps:

Switching from imported data to DirectQuery or Live Connection in Power BI 

Regards,

Xiaoxin SHeng

Anonymous
Not applicable

Seems like I was able to solve the problem and it was somewhat connected to the RangeStart and RangeEnd Parameters set up in my datamodel. Only taking them out of filter statements in the actual queries on PowerQuery did not suffice. I had to delete the two parameters alltogether.

Also, I followed the advice to take another source into the sane datamodel as a direct query source. Apply the query changes, and then delete it again afterwards.

 

Hopefully this will help when someone else faces the same issue.

Thanks, removing RangeStart and RangeEnd helped me too.

I have a report using Azure SQL DB and Dataflows.  All tables are set to Import.

Publishing to Service, Scheduled Refresh was missing and clicking Refresh on my dataset it would run instantly.

Now that I removed the RangeStart and RangeEnd, I'm able to refresh the dataset.

GilbertQ
Super User
Super User

Hi @Anonymous  What I would suggest is trying to make a change on one of the tables in Power Query which would force it to import the data.  And see if that works





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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