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
pawlowski6132
Helper IV
Helper IV

Migrating queries from one source/mode to another. Best practice?

I have a report with a query that runs native SQL to Oracle in import mode. I need to switch that query to sourcing from a Power BI dataset which, will only operate in DQ mode.

 

I have 8 relationships to other dimension tables and numerous measures built off this fact query/table.

 

I don't see around re-building this report unfortunately. I hope I'm wrong. 

 

Does anyone have any best bractices they've developed going through a similar exercise?

 

I actually have six of these queries/tables in this report I have to deal with.

2 ACCEPTED SOLUTIONS

Hmmm. I have to think through this a bit. There might be something in there I can use. Of course, and it's always the case, my situation is a bit more complicated I think. I'm actually going to be creating 6 discreet datasets. The reason is, while 2 of the queries need to refresh multiple times a day the others need to refresh weekly, monthly or not at all. 

 

View solution in original post

v-stephen-msft
Community Support
Community Support

Hi @pawlowski6132 ,

 

If your model started out in Excel, but now you are forced to connect to data in a database, you do not have to stress out. Yes, unless you watch this video, you will have to rebuild everything, but if you do watch this video, I will show you how you can move your table(s) from one data source type to another without having to break anything.

The steps to switch are the following:

  1. Bring the new table in (do not delete the old one – NEVER delete the old one)
  2. Disable load for the new table
  3. Make the new table look as close as possible to the old table (if you can’t, don’t stress, as long as the old column names can still be found – nothing will break)
  4. Go to Advanced Editor in Transform Data window and copy the code (M code for the techies) into your clipboard then hit escape
  5. Now go to Advanced Editor for the old table and replace its code with the new code you had just copied into your clipboard, then hit OK
  6. Do it for all tables you need to switch and then hit Close and Apply
  7. You are done, everything should still work measures will still work as long as the column names stayed the same and your relationships should not be broken

Please watch the video for more details:

https://www.youtube.com/watch?v=9AG1gIMRADo

 

 

Best Regards,

Stephen Tao

 

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

 

View solution in original post

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @pawlowski6132 ,

 

If your model started out in Excel, but now you are forced to connect to data in a database, you do not have to stress out. Yes, unless you watch this video, you will have to rebuild everything, but if you do watch this video, I will show you how you can move your table(s) from one data source type to another without having to break anything.

The steps to switch are the following:

  1. Bring the new table in (do not delete the old one – NEVER delete the old one)
  2. Disable load for the new table
  3. Make the new table look as close as possible to the old table (if you can’t, don’t stress, as long as the old column names can still be found – nothing will break)
  4. Go to Advanced Editor in Transform Data window and copy the code (M code for the techies) into your clipboard then hit escape
  5. Now go to Advanced Editor for the old table and replace its code with the new code you had just copied into your clipboard, then hit OK
  6. Do it for all tables you need to switch and then hit Close and Apply
  7. You are done, everything should still work measures will still work as long as the column names stayed the same and your relationships should not be broken

Please watch the video for more details:

https://www.youtube.com/watch?v=9AG1gIMRADo

 

 

Best Regards,

Stephen Tao

 

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

 

parry2k
Super User
Super User

@pawlowski6132 all the best, feel free to reach out if need more help. Cheers!!

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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.

parry2k
Super User
Super User

@pawlowski6132 I'm sure this article will help you to do this or it is easier.

 

- make copy of your pbix file with all the data and measures in it

- remove all the visual from this file, keep blank page, we will use it as a model

- publish this file and it now become a dataset

- ope original file

- in Power Query, remove all the tables from the file

- close and apply

- all visual will fail

- now choose power bi as a dataset and connect it to the published file

- everything should work (visuals are back)

- and this file become your thin report file

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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.

Hmmm. I have to think through this a bit. There might be something in there I can use. Of course, and it's always the case, my situation is a bit more complicated I think. I'm actually going to be creating 6 discreet datasets. The reason is, while 2 of the queries need to refresh multiple times a day the others need to refresh weekly, monthly or not at all. 

 

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.