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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
m4xon
Helper I
Helper I

Which data retrieval option is better from performance and best practices view

Hello All,

 

I have a probably simple question for more advanced users. I create reports based on ssms views. Is it better to get the data to Power BI from that view and later populate it by for example Table.SelectColumns in Power Query to obtain necessary tables or it is better to create these additional tables based on SELECT from that view or maybe avoid using PowerQuery and use DAX only? I would be greatful for your feedback for less experience collegue. 


Summarizing we have following options:

1) Data_Source = Sql.Database("Server", "Database", [Query="SELECT * FROM [dbo].[dboView]"])
2) point 1 + Sql.Database("Server", "Database", [Query="SELECT [Column2], [Column5] FROM [dbo].[dboView]"]) (as many times as we need something)
3) point 1 + Table.SelectColumns ( Data_Source, {"Column2", "Column5"}) (as many times as we need something)

4) point 1 + DAX (as many times as we need something)

 

Thank you in advance

Max

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @m4xon ,

For performance:

Option2 is the best way, only select the columns needed from data source will save query time and memory.

For Practice:

Option3 and Option4 are the same, because DAX operation(delete columns) will also add a step in Power Query. If you maybe use other columns later, choose this way can help you modify steps in Power Query.

 

Best Regards,
Community Support Team _ kalyj

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

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @m4xon ,

For performance:

Option2 is the best way, only select the columns needed from data source will save query time and memory.

For Practice:

Option3 and Option4 are the same, because DAX operation(delete columns) will also add a step in Power Query. If you maybe use other columns later, choose this way can help you modify steps in Power Query.

 

Best Regards,
Community Support Team _ kalyj

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.