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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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