0

I have a sharepoint list with a Store id called SCID and a date field with the visit date.

I want to create a 2 column collection with the SCID and the last vist date for the SCID.

I copied the following code from another response with a similar task. I just replaced fields with my info. PowerApps states invalid arguments received 2 expected 3 or more

ClearCollect(colLastVisit, 
    AddColumns(
        GroupBy(Store_Visit,Store_Visit.Store_SCID),
     "LastVisitDate", Max(Visit_Date))
    )
)

What am I doing wrong?

SJJ9166
  • 71
  • 1
  • 6

1 Answers1

1

The GroupBy() function requires 3 arguments: the table, the column names in the table you want to group by, and the new name that you are giving your group. It looks like you're missing the third argument.

Here is more information: https://learn.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby

Emily Kessler
  • 231
  • 1
  • 1