Luis
Luis

Reputation: 41

Error in SSAS Tabular: An M partition uses a data function which results in access to a data source different from those defined in the model

I have a SSAS tabular. I'm trying to create a expression.

The code is the next:

= Sql.Database("ServerName", "mydatabase",[Query="SELECT * FROM DW_D_AC_CERTIF_OPER_DIM"])

But when I try to process the partition it gives me the following error:

An M partition uses a data function which results in access to a data source different from those defined in the model.

Can anyone help me?

Upvotes: 4

Views: 667

Answers (1)

TheRizza
TheRizza

Reputation: 2062

In Tabular, you create data sources first. Then you reference them by name in M in place of "ServerName" in your code.

DataSources referenced in M

Upvotes: 2

Related Questions