Ok Try This
On Visible
ClearCollect(Collection1, Distinct( DatasourceName, TagId ));
On Change of any of the datepickers
Clear(Collection2);
ForAll(Collection1,
Collect(Collection2,
{
TagID : Value,
Milk : Text(Sum(Filter(Datasource,TagID=Value && DateColumn > Datepicke1.SelectedDate && DataColumn <DatePicker2.SelectedDate ),Milk))
}
);
Try this and let me know if there is any issue in the code