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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Command Timeout in M code in Power Query

Hi

 

Can somebody please assist with syntax when adding a Command Timeout to the source of a (non-native) query imported table?

 

This is the code I am struggling to add the Command timeout to:

let
Source = #"SQL/servername;dbname",
SSAS_V_Income_Statement = Source{[Schema="SSAS",Item="V_Income_Statement"]}[Data]
in
SSAS_V_Income_Statement


I use the following code when adding the Command Timeout to the native query generated table and this works:

let

Source = Sql.Database("servername","dbname",[CommandTimeout=#duration(0, 2, 0, 0)]),
MyQuery =
Value.NativeQuery(
Source,
"


SELECT...... "

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

Check the similar thread  below:

https://community.powerbi.com/t5/Desktop/How-to-set-command-timeout-option/m-p/487941

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

hi Kelly

 

Thank you for the response.

 

I tried using the SQL.DATABASES function/prefix, but that did not work.

 

So my problem remains adding the timeout to this part #"SQL/servername;dbname" ...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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