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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PowerBIlearner
Frequent Visitor

Custom SQL instead of table or view

Hello,


Can you tell me how do I write the custom sql/ derived table to join to existing tables from the databases? I would like to be able to use derived table. The only options I see is I can use tables/views from the database. Thank you in advance.

 

@ankitpatira

@Greg_Deckler

@BhaveshPatel

@Seth_C_Bauer

@v-haibl-msft

@ImkeF

@Baskar

@Sean

 

Shruthi

2 ACCEPTED SOLUTIONS

@PowerBIlearner When you connect to the SQL Server you can expand the "Advanced options" and input a SQL query to pull in the data that you want.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

v-qiuyu-msft
Community Support
Community Support

Hi @PowerBIlearner,

 

When we connect to SQL Server data source, we can use derived tables in the T-sql query, you can refer to the sample below:

 

q3.PNGq4.PNGq5.PNG

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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-qiuyu-msft
Community Support
Community Support

Hi @PowerBIlearner,

 

When we connect to SQL Server data source, we can use derived tables in the T-sql query, you can refer to the sample below:

 

q3.PNGq4.PNGq5.PNG

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, it helped !

...and when you have 15 queries so that you want 15 datasets then you do the SQL conneciton 15 times - just genious on Microsoft's part (sarcasm) 

@PowerBIlearner When you connect to the SQL Server you can expand the "Advanced options" and input a SQL query to pull in the data that you want.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.