ISLOGICAL 函数

检查某个值是否是逻辑值(TRUE 或 FALSE),并且返回 TRUE 或 FALSE。

语法

ISLOGICAL(<value>)

参数

定义

value

要测试的值。

属性值/返回值

如果值为逻辑值,将返回 TRUE;如果值为 TRUE 或 FALSE 之外的任何值,将返回 FALSE。

示例

以下三个示例演示了 ISLOGICAL 的行为。

//RETURNS: Is Boolean type or Logical
=IF(ISLOGICAL(true), "Is Boolean type or Logical", "Is different type")

//RETURNS: Is Boolean type or Logical
=IF(ISLOGICAL(false), "Is Boolean type or Logical", "Is different type")

//RETURNS: Is different type
=IF(ISLOGICAL(25), "Is Boolean type or Logical", "Is different type")

请参阅

其他资源

信息函数 (DAX)