Assuming by Table you just mean a Collection of Data. We could leverage the Group By function to organize the data by location and then use the Count Rows Function to count our grouped locations.
ClearCollect(
SummaryTable,
AddColumns(
GroupBy(
OriginalLocations,
"Location",
"GroupedData"
),
"Location",
First(GroupedData).Location,
"Count",
CountRows(GroupedData)
)
)
Here We take our original locations collection "OriginalLocations" and we groupby the "Location" Column and then we run our CountRows on our grouped data we called "GroupedData". We then add this to a new collection SummaryTable which will hold the locations and values.