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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MV23
Frequent Visitor

SQL Functions in Power BI

I have a sql function defined in my Azure SQL Server database.

Does anyone know how I can call that function in Power BI?

I am able to see that function in the Data Sources tab and did select it. I want to use that function to create a new column in the tabular representation of the data in Power BI.

1 ACCEPTED SOLUTION

Thanks. I was able to get to it this way.

1. Select the sql function when you initially select your data sources. If you forget to do that, click on "Get Data" or "Recent Sources" and select the function you'd like to add.

2. Then, click on "Edit Queries".

3. Select the table that you want to add the new column to.

4. Click on "Add column".

5.  Click "Invoke Custom Function".

6.  Give your new column a name.

7. Select the function you wanted to call.

8. Add a parameter if you'd like. You can either add a value or select an existing column.

9. Hit "Ok" and you will have your new column.

View solution in original post

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @MV23,

 

Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.

 

Best Regards!
Dale

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

Thanks. I was able to get to it this way.

1. Select the sql function when you initially select your data sources. If you forget to do that, click on "Get Data" or "Recent Sources" and select the function you'd like to add.

2. Then, click on "Edit Queries".

3. Select the table that you want to add the new column to.

4. Click on "Add column".

5.  Click "Invoke Custom Function".

6.  Give your new column a name.

7. Select the function you wanted to call.

8. Add a parameter if you'd like. You can either add a value or select an existing column.

9. Hit "Ok" and you will have your new column.

Hi @MV23,

 

Thank you for sharing with the community!

 

Best Regards!

Dale

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

Yes you can!  I've done this recently with an SQL database.  When you say "Get Data" and select your Server/Database, there is an Advanced Options.  There will be an SQL statement box.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors