无法部署元数据.原因:"Filter_Table"的语法不正确 [英] Unable to deploy metadata. reason : The syntax of 'Filter_Table' is incorrect
问题描述
我创建了以下计算列.
IsRenewal :=
VAR Filter_Table =
SUMMARIZE (
FILTER (
SUMMARIZE (
SUMMARIZE (
FACT_ACCOUNT;
FACT_ACCOUNT[ID_LOAN_INFORMATION];
FACT_ACCOUNT[ID_COSTUMER]
);
FACT_ACCOUNT[ID_COSTUMER];
"abc"; COUNTROWS (
SUMMARIZE (
FACT_ACCOUNT;
FACT_ACCOUNT[ID_LOAN_INFORMATION];
FACT_ACCOUNT[ID_COSTUMER]
)
)
);
[abc] > 1
);
FACT_ACCOUNT[ID_COSTUMER]
)
VAR Latest =
FILTER (
Filter_Table;
FACT_ACCOUNT[ID_COSTUMER] = EARLIER ( FACT_ACCOUNT[ID_COSTUMER] )
)
RETURN
IF ( ISBLANK ( Latest ); 0; 1 )
下面的图片表示以前的Dax表达式的结果.
The following picture represent the result of the previous Dax expression.
在新的计算列中得到了想要的结果. 但是问题是当我尝试部署模型时,出现以下错误, 无法部署元数据.原因:"Filter_Table"的语法不正确."
I got the result that I wanted in the new calculated column. But the problem is when i tried to deploy the model i got the following ERROR, "unable to deploy metadata. reason : The syntax for 'Filter_Table' is incorrect".
问题似乎出在我创建它的第一个变量中. 因此,我尝试在SSMS中运行Filter_Table的结果,但没有收到任何语法错误.
It seems that the problem is in the first variable that i create it. So I tried to run the result of Filter_Table in SSMS, but, I didn't get any syntax ERROR.
以下捕获显示了SSMS中Filter_Table的结果
The following capture present the result of Filter_Table in SSMS
所以我需要帮助来找到为什么无法部署我的项目的原因.
So i need help to find why i couldn't deploy my project.
推荐答案
似乎我无法在计算列中使用变量,因此我通过使用以下表达式来解决了该问题
It seems that i could not use a variable in the calculate column,so I resolved it by using the following expression
IsRenewal :=
IF (
ISBLANK (
FILTER (
SUMMARIZE (
FILTER (
SUMMARIZE (
SUMMARIZE (
FACT_ACCOUNT;
FACT_ACCOUNT[ID_LOAN_INFORMATION];
FACT_ACCOUNT[ID_COSTUMER]
);
FACT_ACCOUNT[ID_COSTUMER];
"abc"; COUNTROWS (
SUMMARIZE (
FACT_ACCOUNT;
FACT_ACCOUNT[ID_LOAN_INFORMATION];
FACT_ACCOUNT[ID_COSTUMER]
)
)
);
[abc] > 1
);
FACT_ACCOUNT[ID_COSTUMER]
);
FACT_ACCOUNT[ID_COSTUMER] = EARLIER ( FACT_ACCOUNT[ID_COSTUMER] )
)
);
0;
1
)
这篇关于无法部署元数据.原因:"Filter_Table"的语法不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!