Google Fusion Table Formula

心不动则不痛 提交于 2019-12-11 07:43:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!