Default value

"Hi, I am creating an app for organizing a soccer tournament. I have created the app but I have a problem. In the app, I load the fixture, meaning I have columns where I enter the home team, the visiting team, and the result. But before the match is played, I will only load the teams but if I don't enter anything in the result, it throws 0 as the value. So in the spreadsheet, it is counted as a tie and a played match. How could I make it so that if I don't enter anything, it returns an empty field? Thank you."

Solved Solved
0 6 238
1 ACCEPTED SOLUTION

 

IFS(
  ISBLANK([goleslocal]), NUMBER(""),
  [goleslocal] > [golesvisitante], 3,
  [goleslocal] = [golesvisitante], 1
)

 

View solution in original post

6 REPLIES 6

Hi @tocappelli 

You could add a -1 to to the initial value of the Result field.

Anther option could be to use an IF statement to only calculate the Result if it <> -1.

I have a column for visitor team goals and another for home team goals. Sorry, I don't have the result. The result is a condition between those two columns. I just want my spreadsheet to return an empty value when I don't put anything in the home team goals column. This is the function I have: IFS([goleslocal] > [golesvisitante], 3, [goleslocal]=[golesvisitante],1)

 

IFS(
  ISBLANK([goleslocal]), NUMBER(""),
  [goleslocal] > [golesvisitante], 3,
  [goleslocal] = [golesvisitante], 1
)

 

Thanks Steve, it helped me and it worked perfectly. I would love to ask you another question.
I have a table where I have a column that contains an ENUM type loaded stadiums. I want to use that same column with the same stadiums but in another table. I was seeing that I should use REF_ROWS but I can't relate. Thank you.

If the list of stadiums is defined in the Values setting of the Enum column of the first table, there is no good way to use that same list of stadiums for an Enum column of another table. To share the list of columns, you need to:

  1. Add a new table that contains only the list of stadiums.
  2. In the Enum columns, remove the Values that identify the stadiums.
  3. In the Enum columns, enable Allow other values.
  4. In the Enum columns, use Valid If to generate a dropdown of stadiums using the list contained in the new table from step (1) above.

You could try the following.

IFS([goleslocal]=-1,"",[goleslocal] > [golesvisitante], 3, [goleslocal]=[golesvisitante],1)

Top Labels in this Space