ISLOGICAL

适用于:计算列计算表度量值视觉计算

检查值是逻辑值(TRUE 还是 FALSE),并返回 TRUE 还是 FALSE

语法

ISLOGICAL(<value>)

参数

术语 定义
value 要测试的值。

返回值

如果值为逻辑值,则 TRUE;FALSETRUEORFALSE以外的任何值。

言论

  • 在计算列或行级别安全性 (RLS) 规则中使用时,不支持在 DirectQuery 模式下使用此函数。
  • 此函数是 ISBOOLEAN 的别名。

以下 DAX 查询显示了 ISLOGICAL.

EVALUATE
{
    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 Boolean type or Logical
    IF ( ISLOGICAL ( 42 ), "Is Boolean type or Logical", "Is different type" ) // RETURNS: Is different type
}