Jarny K
Jarny K

Reputation: 1

EnableFolding on DirectQuery-Expression.Error: 4 arguments were passed to a function which expects between 1 and 2. - Power BI

At this point I am trying to Enable query folding for my DirectQuery on an Oracle Database. This so I can increase my "refresh speed". By refresh speed I mean the time it takes to reload my data in my matrix visual when selecting another value in one of my filters.

At the moment it takes around 40sec to adjust the data based on changing the filter/slicer value. I did read that by using query folding I could reduce the speed to around 10sec.

I guess there are no syntax errors because I can run it. Except for getting next error message: Expression.Error: 4 arguments were passed to a function which expects between 1 and 2. Details: Pattern= Arguments=[List]

Can anyone help me? I have a screenshot underneath.

Error Message

let
Bron =
Oracle.Database
("CSPROD",
[HierarchicalNavigation=true,
Query="SELECT 
#(lf)vs.afdeling||' '||vs.klantnr as ""CONCAT AfdKlantnr"",
#(lf)decode (vs.maand, 1,'JAN',2,'FEB',3,'MRT',4,'APR',5,'MEI',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OKT',11,'NOV',12,'DEC') as ""Maand Oms"",
#(lf)vs.* 
#(lf)FROM 
#(lf)TVKSTAT vs
#(lf)WHERE 
#(lf)vs.jaar>to_number(to_char(sysdate,'YYYY')-15)
#(lf)ORDER BY 
#(lf)vs.jaar desc, 
#(lf)vs.maand,
#(lf)vs.klantnr,
#(lf)vs.artikel,
#(lf)vs.afdeling"],
null,
[EnableFolding=true])
in
Bron

I tried to build up my syntax in different ways. I hope to improve my data load speed when selecting another value in my slicers.

Upvotes: 0

Views: 220

Answers (1)

horseyride
horseyride

Reputation: 21428

I don't believe [EnableFolding=true] is a valid option, since folding is enabled by default with the connector

let
Bron =
Oracle.Database
("CSPROD",
[HierarchicalNavigation=true,
Query="SELECT 
#(lf)vs.afdeling||' '||vs.klantnr as ""CONCAT AfdKlantnr"",
#(lf)decode (vs.maand, 1,'JAN',2,'FEB',3,'MRT',4,'APR',5,'MEI',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OKT',11,'NOV',12,'DEC') as ""Maand Oms"",
#(lf)vs.* 
#(lf)FROM 
#(lf)TVKSTAT vs
#(lf)WHERE 
#(lf)vs.jaar>to_number(to_char(sysdate,'YYYY')-15)
#(lf)ORDER BY 
#(lf)vs.jaar desc, 
#(lf)vs.maand,
#(lf)vs.klantnr,
#(lf)vs.artikel,
#(lf)vs.afdeling"]
)
in
Bron

Not sure if the #(lf)'s belong either, but left those

you can also take a look at using the OleDb.DataSource connector as described at https://www.thebiccountant.com/2021/01/12/your-oracle-data-import-in-power-bi-and-power-query-is-slow/

Upvotes: 0

Related Questions