Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powerbi 与ISNOTBLANK()等价的Dax表达式_Powerbi_Dax - Fatal编程技术网

Powerbi 与ISNOTBLANK()等价的Dax表达式

Powerbi 与ISNOTBLANK()等价的Dax表达式,powerbi,dax,Powerbi,Dax,我试图在Dax中创建一个PBI列,如果DateTime列不是空的,则进行计算。Power BI中目前没有ISNOTBLANK()子句,因此我无法直接引用它 但是,由于该列是日期时间格式,我无法替换ISNOTTEXT()或ISNOTNUMBER(),因为它们会产生解析错误。如果&&作为AND求值也不是一个可用的解决方案,则使用|作为OR求值 我试着写一份声明,比如 DateFilter = IF(ISBLANK(Table[Date1]) && ISBLANK(Table[Date

我试图在Dax中创建一个PBI列,如果DateTime列不是空的,则进行计算。Power BI中目前没有ISNOTBLANK()子句,因此我无法直接引用它

但是,由于该列是日期时间格式,我无法替换
ISNOTTEXT()
ISNOTNUMBER()
,因为它们会产生解析错误。如果
&&
作为AND求值也不是一个可用的解决方案,则使用
|
作为OR求值

我试着写一份声明,比如

DateFilter = IF(ISBLANK(Table[Date1]) && ISBLANK(Table[Date2]), "BOTH BLANK", 
             IF(ISBLANK(Table[Date1]) && Table[Date2]<>ISBLANK(Table[Date2]), "Date1 BLANK"
             IF(ISBLANK(Table[Date2]) && Table[Date1]<>ISBLANK(Table[Date1]), "Date2 BLANK"
             IF( Table[Date1]<>ISBLANK(Table[Date1]) && Table[Date2]<>ISBLANK(Table[Date2]), "NEITHER BLANK"
             ,"ERROR"))))
DateFilter=IF(ISBLANK(表[Date1])&&ISBLANK(表[Date2]),“均为空”,
如果(ISBLANK)(表[Date1])&表[Date2]为空(表[Date2]),则“Date1为空”
如果(ISBLANK)(表[Date2])&表[Date1]为空(表[Date1]),则“Date2为空”
如果(表[Date1]为空(表[Date1])&表[Date2]为空(表[Date2]),则“均不为空”
,“错误”)))

但是在此格式中不可能使用标量ISBLANK()子句,并引发标量错误。有没有办法编写一个Dax查询,生成与ISBLANK()等价的结果?

有一个
ISBLANK
函数和一个
NOT
函数,因此您可以将它们放在一起:

IsNotBlank = NOT(ISBLANK())

有一个
ISBLANK
函数和一个
NOT
函数,因此您可以将它们放在一起:

IsNotBlank = NOT(ISBLANK())