Forum Discussion

abhi9255's avatar
abhi9255
Advocate II
8 years ago
Solved

How to set command timeout option

My query is taking more time to refresh and when i refresh im getting command timeout error . So i need to set command timeout option in Power BI desktop but it is disabled at the moment how to enab...
  • v-frfei-msft's avatar
    v-frfei-msft
    8 years ago

    Hi abhi9255,

     

    For SQL database, we can change the command timeout in Advanced options of  Data source settings directly.

     

     

    And here is the M code for your reference.

     

     

     

    let
        Source = Sql.Databases("Servername", [CommandTimeout=#duration(0, 0, 35, 0)]),
        TestGatewayDocs = Source{[Name="databasename"]}[Data],
        dbo_Product3 = databasename{[Schema="dbo",Item="Product3"]}[Data]
    in
        dbo_Product3

     

    Regards,

    Frank