Forum Discussion
Importing Excel Power Pivot Model into Power BI
- Anonymous2 years ago
Hi chicagolarsons ,
According to the error information you provided, have you installed the client library for connecting to Azure Analysis Services? For details, refer to the following article.
Analysis Services client libraries | Microsoft Learn
If Office is 32-bit and Desktop is 64-bit, it may cause compatibility issues. Make sure both are consistent.
Best Regards,
Wenbin Zhou
Hi, OP here again. I thought it might be helpful to share a copy of one of the queries that got generated automatically by power query when I imported the data model. I'm wondering if there is a way that the query could continue to refresh in Excel and Power Query could then just copy over the updated data in the tables in the model?
let
Source = OleDb.Query("Provider=MSOLAP;Data Source=server name; initial catalog=BST10_Analytics_XXX;dbpropmsmdflattened2=true", "SELECT NON EMPTY { [Measures].[Balance BC], [Measures].[Budget Balance CC] } ON COLUMNS, NON EMPTY { ([Posting Calendar].[Posting Period].[Posting Period].ALLMEMBERS * [Account].[Account Type].[Account Type].ALLMEMBERS * [Account].[Company].[Company].ALLMEMBERS * [Organization].[Organization Code].[Organization Code].ALLMEMBERS * [Account].[Account Code].[Account Code].ALLMEMBERS * [Account].[Account Name].[Account Name].ALLMEMBERS * [Organization Map].[Level 2].[Level 2].ALLMEMBERS * [Account Map].[Level 5].[Level 5].ALLMEMBERS * [Account Map].[Level 6].[Level 6].ALLMEMBERS * [Account Map].[Level 7].[Level 7].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( -{ [Account].[Account Code].&[401800] } ) ON COLUMNS FROM ( SELECT ( -{ [Posting Calendar].[Posting Period].&[202513], [Posting Calendar].[Posting Period].&[202413], [Posting Calendar].[Posting Period].&[202313], [Posting Calendar].[Posting Period].&[202213], [Posting Calendar].[Posting Period].&[202113] } ) ON COLUMNS FROM ( SELECT ( { [Organization Map].[Organization Map Code].&[24Alt] } ) ON COLUMNS FROM ( SELECT ( { [Account Map].[Account Map].&[2IS: XXX Income Statement 2017] } ) ON COLUMNS FROM ( SELECT ( { [Posting Calendar].[Posting Calendar Hierarchy].[Posting Year].&[2022], [Posting Calendar].[Posting Calendar Hierarchy].[Posting Year].&[2023], [Posting Calendar].[Posting Calendar Hierarchy].[Posting Year].&[2024], [Posting Calendar].[Posting Calendar Hierarchy].[Posting Year].&[2025] } ) ON COLUMNS FROM [General Ledger]))))) WHERE ( [Posting Calendar].[Posting Calendar Hierarchy].CurrentMember, [Account Map].[Account Map].&[2IS: XXX Income Statement 2017], [Organization Map].[Organization Map Code].&[24Alt] ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS"),
#"Renamed Columns" = Table.RenameColumns(Source, {{"[Measures].[Budget Balance CC]", "MeasuresBudget Balance CC"}, {"[Account Map].[Level 6].[Level 6].[MEMBER_CAPTION]", "Account MapLevel 6Level 6"}, {"[Account Map].[Level 7].[Level 7].[MEMBER_CAPTION]", "Account MapLevel 7Level 7"}, {"[Organization].[Organization Code].[Organization Code].[MEMBER_CAPTION]", "Org Code"}, {"[Account].[Company].[Company].[MEMBER_CAPTION]", "Company"}, {"[Account Map].[Level 5].[Level 5].[MEMBER_CAPTION]", "Account MapLevel 5Level 5"}, {"[Measures].[Balance BC]", "MeasuresBalance BC"}, {"[Posting Calendar].[Posting Period].[Posting Period].[MEMBER_CAPTION]", "BST Posting Period"}, {"[Account].[Account Type].[Account Type].[MEMBER_CAPTION]", "AcctType"}, {"[Account].[Account Code].[Account Code].[MEMBER_CAPTION]", "Acct#"}, {"[Account].[Account Name].[Account Name].[MEMBER_CAPTION]", "AccountName"}, {"[Organization Map].[Level 2].[Level 2].[MEMBER_CAPTION]", "Region"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns", {{"MeasuresBudget Balance CC", type number}, {"Account MapLevel 6Level 6", type text}, {"Account MapLevel 7Level 7", type text}, {"Org Code", type text}, {"Company", type text}, {"Account MapLevel 5Level 5", type text}, {"MeasuresBalance BC", type number}, {"BST Posting Period", type text}, {"AcctType", type text}, {"Acct#", type text}, {"AccountName", type text}, {"Region", type text}})
in
#"Changed Type"