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
Anonymous
Not applicable

Direct Query Best Practise DB Views

Greetings,

I'm using Direct Query for a Proof of Concept for a PBI Embedded Dashboard and Report I'm building. One of the major challenges I'm facing is formatting and joining data together and given the original data source exceeds over a million rows I cannot use the wonders of DAX. However, I have worked out if I create a Database View I can then do all the transformation and joining tables without the pain of hacking around stuff in DAX etc. 

 

My question is, is it acceptable to create views in the DB and connect it to PBI?

 

I'm just concerned I'm missing something if it's that easy 😊. I appreciate for a production solution I'd implement data model changes to support PBI, but I do not have that luxury just now and wanting to get a second opinion/s on is that the right thing to do in real life?

1 ACCEPTED SOLUTION
aj1973
Community Champion
Community Champion

Hi @Anonymous 

If I understood your question correctly then the answer is Yes, you can create your Views in the DB and Import/DirectQuery them to Power BI. Know though that these Views can be avoided if you Import directly your tables to Power Bi and Model them.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

3 REPLIES 3
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous,

 

You can use your SQL views in Power BI.
Try to connect to it by  your server and database name , and then expand the "Advanced Options", and drop in a query to call upon that view.

SELECT [Field List]
FROM dbo_viewname

Take SQL Server and Oracle DB for example:

 1.png2.png

 

Best Regards,

Link

aj1973
Community Champion
Community Champion

Hi @Anonymous 

If I understood your question correctly then the answer is Yes, you can create your Views in the DB and Import/DirectQuery them to Power BI. Know though that these Views can be avoided if you Import directly your tables to Power Bi and Model them.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

Thank you, that's great

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.