title: number of arguments in Power Query custom function
body: <p>guys!</p>
  
  <p>I tried to create my custom function in Power Query and came across very unexpected and totally non-clear to me Err.</p>
  
  <p>Function is simple -- it retrieves Name of the Student from Students Dictionary (it is called from Students Dictionary Table), then it retrieves tables of invoices and calculates how many invoieces were issued to this paticular Student.</p>
  
  <p>code of the function is as following:</p>
  
  <pre><code>    (FirstName as text) =&gt;
  
  let
      Source = XeroInvoices,
      #"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([XeroContacts.Name], FirstName) ),
      #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"XeroContacts.Name"}),
      #"Grouped Rows" = Table.Group(#"Removed Other Columns", {"XeroContacts.Name"}, {{"Result", each Table.RowCount(_), type number}}),
      Result = Record.Field(#"Grouped Rows", {0}, "Result")
  in
      Result
  </code></pre>
  
  <p>Yet, as I call function with one argument, it says that <strong><em>three</em></strong> arguments were passed, and that the function expected <strong><em>two</em></strong>:</p>
  
  <p><a href="http://shot.qip.ru/00Qqzx-4Vmk2GJfF/" rel="nofollow">http://shot.qip.ru/00Qqzx-4Vmk2GJfF/</a></p>
  
  <p>Could you please suggest what can be the problem with this all?</p>
  
  <p>Thanks in advance.</p>