Re: Trying to display a list of meter readings where the datasource has only 1 reading per client
Hi @WarrenBelz I have changed the code as attached but it's now showing 1081 records instead of 693 the first time - I don't think there should be more than 200 meterefs with only 1 reading....
With(
{
_Data: Sort(
Filter(
MeterReadings,
readdate >= (DatePickerFrom.SelectedDate) && readdate <= DatePickerTo.SelectedDate && (StartsWith(
meterref,
SearchBox.Text
) || StartsWith(
auth,
SearchBox.Text
))
),
ID,
SortOrder.Descending
)
},
SortByColumns(
AddColumns(
GroupBy(
_Data,
"meterref",
"Grouped"
),
"clientname",
First(Grouped).clientname,
"clientref",
First(Grouped).clientref,
"reading",
First(Grouped).reading,
"readdate",
First(Grouped).readdate,
"dialscode",
First(Grouped).dialscode,
"wma",
First(Grouped).wma,
"auth",
First(Grouped).auth,
"comments",
First(Grouped).comments
),
"meterref"
)
)
thanks