Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
RafDelgado
Helper II
Helper II

Refreshing data which uses a variable from another table - not supported in Power BI App

 

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.

 

 

2015-11-27_13-52-31.png

 

 

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?

0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.