Forum Discussion
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?
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.
3 Replies
- aj1973Community 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.
- AnonymousNot applicable
Thank you, that's great
- v-xulin-mstfCommunity 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_viewnameTake SQL Server and Oracle DB for example:
Best Regards,
Link