我在Excel 2013中创建了一个包含两个查询的数据模型:
我想在这些CUSTOMER_ID列之间创建一对多的关系但是当我尝试这样做时,我收到以下错误:
============================
Error Message:
============================
The following system error occurred: Type mismatch.
Cannot convert value 'D: ControlTechSK4633-1' of type Text to type Integer.
----------------------------
The following system error occurred: Type mismatch.
Cannot convert value 'D: ControlTechSK4633-1' of type Text to type Integer.
============================
Call Stack:
============================
at Microsoft.AnalysisServices.BackEnd.DataModelingSandbox.ExecuteCaptureLogAndProcessResults(OperationType type, Boolean cancellable, Boolean raw, Boolean raiseEvents)
at Microsoft.AnalysisServices.BackEnd.DataModelingSandbox.ExecuteAMOCode(OperationType type, OperationCancellability cancellable, AMOCode code, Boolean raiseEvents)
at Microsoft.AnalysisServices.BackEnd.SandboxTransaction.CommitUpdates()
at Microsoft.AnalysisServices.BackEnd.SandboxTransaction.CommitInternal(Boolean finalCommit)
----------------------------
at Microsoft.AnalysisServices.BackEnd.SandboxTransaction.CommitInternal(Boolean finalCommit)
at Microsoft.AnalysisServices.Common.RelationshipController.CreateRelationship(DataModelingColumn sourceColumn, DataModelingColumn relatedColumn)
at Microsoft.AnalysisServices.Common.RelationshipController.formCreateRelationshipDialog_Confirming(Object sender, EventArgs e)
at Microsoft.AnalysisServices.Common.CreateRelationshipDialog.buttonOK_Click(Object sender, EventArgs e)
============================
提前感谢您的帮助。
答案 0 :(得分:0)
对我来说,似乎Customer_ID在一个表中被格式化为Text,而在另一个表中则没有。如果是这样,有没有办法在两个源中以相同的方式格式化字段?
如果没有,您可以使用计算列中的FORMAT函数(在具有格式为文本的数字的表中)绕过它。然后,您可以将该计算列用于您的加入/关系。
格式功能的一些信息: http://social.technet.microsoft.com/wiki/contents/articles/685.power-bi-dax-text-functions.aspx
编辑: 此外,我刚刚意识到,如果您在数字列中有文本值,则可能会导致此错误。您可能需要检查数据以查看该方案是否存在。