Forum Discussion
Power BI Query - 2 arguments were passed to a function which expects 3
(Created as date, Closed as date, Holiday as list) as number => let ListDates = List.Dates (Created, Number.From (Closed-Created), #duration(1,0,0,0)), RemoveWeekends = List.Select(ListDates, each Date.DayOfWeek(_, Day.Monday)< 5), RemoveHolidays = List.RemoveItems (RemoveWeekends,Holiday), CountDays=List.Count(RemoveHolidays) in CountDays
It has returned an error saying:
Expression.Error: 2 arguments were passed to a function which expects 3. Details: Pattern= Arguments=[List]
Can anyone help me pinpoint what this error means and where I may have messed up the query?
1 Reply
- jennrattenSuper User
Hello - when I invoke the function I don't get an error. Your function has three required arguments, so three must be entered when the function is invoked, like the snip below. From the error message, it looks like perhaps a list of holiday dates is not be included.