Hello,
I'm creating a carbon emissions data capture app.
Data is stored in SQL - the underlying data looks something like this:
"VehicleFuels" table for all data entries relating to distance travelled per each vehicle type, and a "VehicleFuelsReport" table which after a button press will store the sum of all entries in any given column from the VehiceFuels table, and apply a conversion factor and store this value too.
In the app, I have two DatePicker controls (FromDatePicker & ToDatePicker).

Upon clicking a "Search" button, the container these are in is set to invisible and an edit form appears.

The datasource for the form is the "VehicleFuelReport" table.
I've not added an "Item" property as Power Apps ignores this if the form's "Default mode" is New, which mine's is.
In the form, to calculate the sum for each entry, I have this formula in each DataCardValue label:
Sum(Filter(VehicleFuelsReport, LocationID = SelectedLocationID && CreatedDate > FromDatePicker.SelectedDate), CompanyCarPetrolDistance)
However, Power Apps is giving me an error saying "Error when trying to retrieve data from the network: We cannot apply operator".
Seems completely correct to me? Has to be something else causing the issue.
I've Tried:
- Removing the "CreatedDate" filters and only filtering on LocationID which works, however this is not the value I need.
- I've removed both datasources from the app completely and re-added them.
- Changed the data row limit from 500 > 1000 > 2000
- Closed the app and re-opened.
- Tried every combination of the formula I can possibly think of.
- Looked at countless form posts.....
Does anyone have any ideas what may be causing this?
Thanks,