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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
kanth32
Advocate I
Advocate I

How to change direct query to import query

Hi Team , 

 

I have connected to HANA DB and created one reporting using Direct query option . Now i want to change from Drirect query option to Import query option . I tried to change in edit query--> change data source(below snap) and there import query option is disable . Can you please let me know how can i change my direct query to import query option . 

 

Import.PNG

1 ACCEPTED SOLUTION

Hi @kanth32,

 

If you're connected by Direct Query, you'll see the message "DirectQuery: Enabled (Click to Change)" in the status bar at the bottom right hand screen on Power BI Desktop:

 

changemode.PNG

 

Click on the message, then you should be able to change Direct Query to Import Model.Smiley Happy

 

cm2.PNG

 

Regards

View solution in original post

16 REPLIES 16
MarioDias
Regular Visitor

Actually, go to Query Editor, then Source step.

 direct_query.png

Anonymous
Not applicable

Thanks for this solution it easily resolved my issue

oscar_bolanos
Advocate I
Advocate I

In Power BI Desktop, go to Model view-->Advanced and change the storage mode from DirectQuery to Import

oscar_bolanos_1-1658511571235.png

 

Since I had a hard time comprehending the terms like Model View etc.. here is a more detailed screenshot that I thought might help. (1) Click model view (2) Click a table that you want to change (3) Click Advanced (4) Make your choice of directquery, import or dual

 

cs97009_0-1684178165663.png

 

Thank you.. I also had very hard time and this solution wored perfectly. 

Rest of the solutions are not trust worthy and most of the times my PBI just stopped responding. 

EnglishCJ
Frequent Visitor

From https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about :

Underlying data source is an OLAP source, containing measuresIf the underlying data source contains measures, such as SAP HANA or SAP Business Warehouse, then importing the data brings other issues. It means that the data imported is at a particular level of aggregation, as defined by the query. For example, measures TotalSales by Class, Year, and City. Then if a visual is built asking for data at a higher-level aggregate, such as TotalSales by Year, it's further aggregating the aggregate value. This aggregation is fine for additive measures, such as Sum and Min, but it's an issue for non-additive measures, such as Average, DistinctCount.

To make it easy to get the correct aggregate data, as needed for the particular visual, directly from the source, it would be necessary to send queries per visual, as in DirectQuery.

When connecting to SAP Business Warehouse (BW), choosing DirectQuery allows for this treatment of measures. For information about SAP BW, see DirectQuery and SAP BW.

However, currently DirectQuery over SAP HANA treats it the same as a relational source, and provides similar behavior to import. This approach is covered further in DirectQuery and SAP HANA.
Anonymous
Not applicable

How can the Storage Mode be changed when the Data Source is an Analysis Services database?

BhaveshPatel
Community Champion
Community Champion

direct.PNG

 

Can you see something like this in Query Editor, Change the Connection Settings to Import Mode,

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Hi  Bhavesh , 

 

Thanks for your reply 

 

we are not able to get that option in edit query . 

You can see this message when you select the Source option in your query applied steps.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Hello Bhavesh , 

 

i can able see the import and direct query option .. in Edit query but there it was disabled please check my intial screen shot 

Hi @kanth32,

 

If you're connected by Direct Query, you'll see the message "DirectQuery: Enabled (Click to Change)" in the status bar at the bottom right hand screen on Power BI Desktop:

 

changemode.PNG

 

Click on the message, then you should be able to change Direct Query to Import Model.Smiley Happy

 

cm2.PNG

 

Regards

What do you do if that message does not appear?

Amazing - thats for sharing, it was impossible to find in MS documentation

Thank you!!! 2022 and still saving lives!!! 🤣

Anonymous
Not applicable

not working with me 😞

after enable " direct query "

 from options restart still disabled ...!!!

 

 

zzzzzzzzzzzzzzzzzz.jpg

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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