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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
EB111222333444
Regular Visitor

Power BI Query - 2 arguments were passed to a function which expects 3

I am new to Power BI Query. I have written this query to be able to calculate networkdays:
 

(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 1
jennratten
Super User
Super 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.

 

jennratten_0-1650392666214.png

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.