Search code examples
powerbipowerquerym

POWERBI: 4 Arguments were passed to a function which expects between 2 and 3


I'm getting this error when I'm trying to add [CommandTimeOut=#duration(0, 2, 0, 0),ConnectionTimeout=#duration(0, 2, 0, 0)] to get rid of all timeout errors.

= Sql.Database("server1\DB","TBL",[Query="long query"],[CommandTimeOut=#duration(0, 2, 0, 0),ConnectionTimeout=#duration(0, 2, 0, 0)])

What should I do?


Solution

  • The third argument is a single record. Try:

    = Sql.Database("server1\DB","TBL",[Query="long query", CommandTimeOut=#duration(0, 2, 0, 0),ConnectionTimeout=#duration(0, 2, 0, 0)])