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
Sujit_Thakur
Solution Sage
Solution Sage

SQL SERVER DIRECT QUERY

Dear All ,

My data source is SQL Server , which instance is created in RDS from AWS .

 

Now when I am importing a view from database  using direct query mode , till this everything is fine , but the time I do some additional steps for editing and performing operation on columns it gives a error that 

 

"This query results in a query which cannot be used in direct query , change to import mode" 

 

 

Please help

@amitchandak 

 

 

Regards

Thakur Sujit 

 

 

 

 

1 ACCEPTED SOLUTION
Sujit_Thakur
Solution Sage
Solution Sage

Thanks all ,. for replying .
After reading Power BI Documentation it was clear that like normal import mode it is not possible to work on data in power query editor , because as every time i move a slicer , PBI queries data on point from SQL Server.
Hence what i did was i did the steps in python where i used to process data before taking it in power bi

then it worked thanks all

 

View solution in original post

4 REPLIES 4
Sujit_Thakur
Solution Sage
Solution Sage

Thanks all ,. for replying .
After reading Power BI Documentation it was clear that like normal import mode it is not possible to work on data in power query editor , because as every time i move a slicer , PBI queries data on point from SQL Server.
Hence what i did was i did the steps in python where i used to process data before taking it in power bi

then it worked thanks all

 

v-eqin-msft
Community Support
Community Support

Hi @Sujit_Thakur ,

 

The issues you describe above are limitations in DirectQuery mode in Power BI Desktop. After we make changes in Query editor, we are not apply these changes to report.

 

Please go to Applied Steps in Power Query to test step by step or as the message said, switch the mode to Import mode.

 

I believe you can get more limitations  information from this official document:

Using DirectQuery in Power BI - Power BI | Microsoft Docs

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

NimaiAhluwalia
Responsive Resident
Responsive Resident

Hello @Sujit_Thakur 

 

Any help from the suggestion I provided ?

 

IF MY SOLUTION HELPED YOU IN SOME OR THE OTHER WAY PLEASE DO HIT A LIKE AND ACCEPT IT AS A SOLUTION IF IT RESOLVES FOR ERROR!

NimaiAhluwalia
Responsive Resident
Responsive Resident

Hello @Sujit_Thakur 

 

If you are using Direct Query please keep the following things noted when creating the model!

 

The term modelling in this context means the act of refining and enriching the raw data, as part of authoring a report using it. Examples include:

  • Defining relationships between tables
  • Adding new calculations (calculated columns and measures)
  • Renaming and hiding columns and measures
  • Defining hierarchies
  • Defining the formatting, default summarization and sort order for a column
  • Grouping or clustering values

 

You are getting this error due to some limitations you are trying to use with Direct query.

 

For more reference refer to this

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

 

IF MY SOLUTION HELPED YOU IN SOME OR THE OTHER WAY PLEASE DO HIT A LIKE AND ACCEPT IT AS A SOLUTION IF IT RESOLVES FOR ERROR!

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.

Top Solution Authors
Top Kudoed Authors