Unable to deploy metadata. reason : The syntax of 'Filter_Table' is incorrect

纵然是瞬间 提交于 2020-06-16 17:25:51

问题


I created the following calculated column.

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 )

The following picture represent the result of the previous Dax expression.

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".

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.

The following capture present the result of Filter_Table in SSMS

So i need help to find why i couldn't deploy my project.


回答1:


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
)


来源:https://stackoverflow.com/questions/62226538/unable-to-deploy-metadata-reason-the-syntax-of-filter-table-is-incorrect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!