Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.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
Excel &引用;以“开始”;在使用DAX的表达式中_Excel_Powerbi_Dax - Fatal编程技术网

Excel &引用;以“开始”;在使用DAX的表达式中

Excel &引用;以“开始”;在使用DAX的表达式中,excel,powerbi,dax,Excel,Powerbi,Dax,如何使用DAX编写表达式来检查字符串是否以其他字符串开头?示例:ext.example以“ext.”开头。您可以使用文本函数 =查找(“BMX”,“BMX赛车产品线”) 检查 此表达式起作用 NewColumn = IF ( LEFT ( TableName[ColumnToSearchIn], LEN ( "Some string" ) ) = "Some string", "Starts With", "Does not start with" ) 此表达式将确定

如何使用DAX编写表达式来检查字符串是否以其他字符串开头?示例:ext.example以“ext.”开头。

您可以使用文本函数

=查找(“BMX”,“BMX赛车产品线”)

检查


此表达式起作用

NewColumn =
IF (
    LEFT ( TableName[ColumnToSearchIn], LEN ( "Some string" ) ) = "Some string",
    "Starts With",
    "Does not start with"
)
此表达式将确定
ColumnToSearchIn
是否以
某些字符串开始


让我知道这是否有帮助。

Mid(someValue,1,Len(“ext.”)=“ext.”
?是的,但我想确切地从“不在任何地方查找”开始。如果搜索文本很长,或者需要由公式确定,“Some string”也可以存储在变量中:NewColumn=VAR search=“Some string”返回if(LEFT)(TableName[ColumnToSearchIn],Len)(搜索))=搜索,“以开头”,“不以开头”)