Please help, I’m confused and don’t understand how I can implement the following task
I have cities - the value is entered by the user
there is a city of departure and a city of arrival - and the price in the direction.
I want to make it so that the user can enter a filter for the directions “select the city of departure and arrival” and see the average cost in the direction.
I understand that I have to somehow use the conditions “average value if” or I’m wrong, and I also don’t understand how to build filters and output values to the table
I do everything in the web version, not the mobile app.
What I would do is create a new table and add only one row. In that table add a user specific column for Departure City, and a user specific column for Arrival City. Create a new tab in your project that points to this new table. This will be the table where user’s enter their departure and arrival city. One the tab screen, add a Text Entry component or a Choice component for both the departure and arrival city.
In you Cities/Prices table, create two Single Value columns. One to retrieve the user entered Departure City and one to retrieve the user entered Arrival City from the new table you created. This will populate whatever the user entered on all rows in the Cities table. Now create an IF column and structure the IF like this:
IF Single Value Departure City is not Departure City THEN ‘’ (return nothing)
ELSE IF Single Value Arrival City is not Arrival City THEN ‘’ (return nothing)
ELSE Price (return the value in the Price column)
Back in your New Table, create a Rollup column that calculates the Average from the IF column you created above in the Cities table.
When a user enters a Departure and Arrival city, it will populate in the new table, which will populate those same values across all rows in the Cities table, and the IF will only return the price for each matching set of cities that match the search criteria. The rollup in the new table will give you the average of those matching rows.