无法部署元数据.原因:“Filter_Table"的语法不正确 [英] Unable to deploy metadata. reason : The syntax of 'Filter_Table' is incorrect

查看:9
本文介绍了无法部署元数据.原因:“Filter_Table"的语法不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了以下计算列.

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.

推荐答案

好像不能在calculate列中使用变量,所以我用下面的表达式解决了

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆