问题
I have a Google Fusion table and I am trying to add a formula column with a simple if statement.
The column TYPE
contains numbers 1-5. I want to update a formula column based on the value in the TYPE
column.
I tried many variations (single quote, double quote, etc) of the following:
IF(TYPE=1,'red','yellow')
But, it always says invalid formula. If statements are permitted and I am following the format described here: https://support.google.com/fusiontables/answer/178196?hl=en
What am I missing?
回答1:
Formulas only work with numeric columns and must produce numeric results. So if('TYPE'=1, 1, 2) would work. You can add your vote to this issue: https://code.google.com/p/fusion-tables/issues/detail?id=235
回答2:
It works like this IF(TYPE=1,"red","yellow")
来源:https://stackoverflow.com/questions/18405446/google-fusion-table-formula