Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm using a function which once invoked specifies which analysis services to run against. When running on the Power BI Desktop, it runs no problem but when publishing it up and trying to refresh the data, it comes up with the below.
The query is below.
let ReportServer = #"SCSM Report Server"{0}[SCSMReportServer], Source = AnalysisServices.Databases(ReportServer, [TypedMeasureColumns = true]), DWASDataBase = Source{[Name="DWASDataBase"]}[Data], SystemCenterWorkItemsCube = DWASDataBase{[Id="SystemCenterWorkItemsCube"]}[Data], SystemCenterWorkItemsCube1 = SystemCenterWorkItemsCube{[Id="SystemCenterWorkItemsCube"]}[Data], #"Added Items" = Cube.Transform(SystemCenterWorkItemsCube1, {{Cube.AddAndExpandDimensionColumn, "[IncidentDim]", {"[IncidentDim].[ClosedDate].[ClosedDate]", "[IncidentDim].[CreatedDate].[CreatedDate]", "[IncidentDim].[Escalated].[Escalated]", "[IncidentDim].[FirstAssignedDate].[FirstAssignedDate]", "[IncidentDim].[FirstResponseDate].[FirstResponseDate]", "[IncidentDim].[IncidentDim_Id].[IncidentDim_Id]", "[IncidentDim].[Priority].[Priority]", "[IncidentDim].[ResolvedDate].[ResolvedDate]", "[IncidentDim].[Title].[Title]"}, {"IncidentDim.Closed date", "IncidentDim.Created date", "IncidentDim.Escalated", "IncidentDim.First assigned date", "IncidentDim.First response date", "IncidentDim.IncidentDim_Id", "IncidentDim.Priority", "IncidentDim.Resolved date", "IncidentDim.Title"}}, {Cube.AddAndExpandDimensionColumn, "[IncidentDim_IncidentClassification]", {"[IncidentDim_IncidentClassification].[IncidentClassificationValue].[IncidentClassificationValue]"}, {"IncidentDim_IncidentClassification.IncidentClassificationValue"}}, {Cube.AddAndExpandDimensionColumn, "[IncidentDim_IncidentImpact]", {"[IncidentDim_IncidentImpact].[IncidentImpactValue].[IncidentImpactValue]"}, {"IncidentDim_IncidentImpact.IncidentImpactValue"}}, {Cube.AddAndExpandDimensionColumn, "[IncidentDim_IncidentResolutionCategory]", {"[IncidentDim_IncidentResolutionCategory].[IncidentResolutionCategoryValue].[IncidentResolutionCategoryValue]"}, {"IncidentDim_IncidentResolutionCategory.IncidentResolutionCategoryValue"}}, {Cube.AddAndExpandDimensionColumn, "[IncidentDim_IncidentSource]", {"[IncidentDim_IncidentSource].[IncidentSourceValue].[IncidentSourceValue]"}, {"IncidentDim_IncidentSource.IncidentSourceValue"}}, {Cube.AddAndExpandDimensionColumn, "[IncidentDim_IncidentStatus]", {"[IncidentDim_IncidentStatus].[IncidentStatusValue].[IncidentStatusValue]"}, {"IncidentDim_IncidentStatus.IncidentStatusValue"}}, {Cube.AddAndExpandDimensionColumn, "[IncidentDim_IncidentTierQueues]", {"[IncidentDim_IncidentTierQueues].[IncidentTierQueuesValue].[IncidentTierQueuesValue]"}, {"IncidentDim_IncidentTierQueues.IncidentTierQueuesValue"}}, {Cube.AddAndExpandDimensionColumn, "[IncidentDim_IncidentUrgency]", {"[IncidentDim_IncidentUrgency].[IncidentUrgencyValue].[IncidentUrgencyValue]"}, {"IncidentDim_IncidentUrgency.IncidentUrgencyValue"}}, {Cube.AddMeasureColumn, "IncidentDimCount", "[Measures].[IncidentDimCount]"}}) in #"Added Items"
If I remove the function from the query (second line) and specify the name manually, It seems to work ok. Has anyone coming a cross this or can thing of a better way to do this?