Hi All,
I am having trouble with code to count rows based on nested filtering of my Collection table values within dates between two date picker values.
In the backend I have a SharePoint list which I have captured fully as a collection in my PowerApp. The collection is called 'AnalyticsCollection'
On my analytics screen I have a from date (DatePicker_Start), and a to date (DatePicker_End), and I have 2 drop down lists which values have been Set as variables. the lists include Region (varAnalyticsRegion) and Office (varAnalyticsOffice) - these values will match values in the Region and Office columns in the AnalyticsCollection.
I have a few variations of the filter (which will count rows based on the filter). if I can get this one right, I can then work out the rest.
This code should count rows where Created date is between the DatePicker values and where RegionLocated column is equal to the value of the region dropbox and where OfficeLocal column is equal to the value of the Office dropbox.
The formula is not providing the correct value, not sure why - please help.

CountRows(Filter(AnalyticsCollection,(Created >= DatePicker_Start.SelectedDate) && (Created <= DatePicker_End.SelectedDate) && RegionLocated = varAnalyticsRegion && OfficeLocal = varAnalyticsOffice))