Forum Discussion
Erreur OLE DB ou ODBC: [DataSource.Error] AnalysisServices
HI Possidius,
Can you please share some more detailed information about these? It is hard to troubleshoot from your descriptions.
How to Get Your Question Answered Quickly
In addition, any special character or permission setting on your accounts? Have you tested with other accounts?
Regards,
Xiaoxin Sheng
Hi Sheng,
Thank you for your help
My current code is
let
Source = AnalysisServices.Database("172.16.x.xx", "Sales Cube", [TypedMeasureColumns=true, Implementation="2.0"]),
#"Sales Cube1" = Source{[Id="Sales Cube"]}[Data],
#"Sales Cube2" = #"Sales Cube1"{[Id="Sales Cube"]}[Data],
#"Éléments ajoutés" = Cube.Transform(#"Sales Cube2",
{
{Cube.AddAndExpandDimensionColumn, "[Company]", {"[Company].[Company].[Company]"}, {"Company.Company"}},
{Cube.AddAndExpandDimensionColumn, "[Date]", {"[Date].[Year-Month-Date].[Calendar Date]", "[Date].[Year-Month-Date].[Month Calendar]", "[Date].[Year-Month-Date].[Year Calendar]"}, {"Date.Calendar Date", "Date.Month Calendar", "Date.Year Calendar"}}
}),
#"Lignes filtrées" = Table.SelectRows(#"Éléments ajoutés", each (Cube.AttributeMemberId([Date.Year Calendar]) = "[Date].[Year-Month-Date].[Year Calendar].&[2021]" meta [DisplayName = "2021"] or Cube.AttributeMemberId([Date.Year Calendar]) = "[Date].[Year-Month-Date].[Year Calendar].&[2022]" meta [DisplayName = "2022"]) and (Cube.AttributeMemberId([Company.Company]) = "[Company].[Company].&[France]" meta [DisplayName = "France"])),
#"Éléments ajoutés1" = Cube.Transform(#"Lignes filtrées",
{
{Cube.AddMeasureColumn, "Cost", "[Measures].[Cost]"},
{Cube.AddAndExpandDimensionColumn, "[Customer]", {"[Customer].[Account].[Account]", "[Customer].[Account Channel].[Account Channel]"}, {"Customer.Account", "Customer.Account Channel"}},
{Cube.AddAndExpandDimensionColumn, "[Invoice Info]", {"[Invoice Info].[Order Credit Type].[Order Credit Type]"}, {"Invoice Info.Order Credit Type"}},
{Cube.AddAndExpandDimensionColumn, "[Pricing Cat]", {"[Pricing Cat].[Pricing Category Hierarchy].[Pricing Category L1]"}, {"Pricing Cat.Pricing Category L1"}},
{Cube.AddAndExpandDimensionColumn, "[Salessite]", {"[Salessite].[Sales Site Name].[Sales Site Name]"}, {"Salessite.Sales Site Name"}},
{Cube.AddMeasureColumn, "NSV", "[Measures].[NSV]"}
}),
#"Type modifié : Date" = Table.TransformColumnTypes(#"Éléments ajoutés1",{{"Date.Calendar Date", type datetime}}),
#"Ajout CrossRéf ""ID Fam Prod""" = Table.AddColumn(#"Type modifié : Date", "# Id Fam Prod", each [Pricing Cat.Pricing Category L1]&[Invoice Info.Order Credit Type]),
#"Colonne BU ""MART/MILL""" = Table.AddColumn(#"Ajout CrossRéf ""ID Fam Prod""", "BU", each if [Customer.Account Channel] = "Y" then "MILL" else "MART"),
#"Lignes filtrées1" = Table.SelectRows(#"Colonne BU ""MART/MILL""", each [Date.Calendar Date] >= RangeStart and [Date.Calendar Date] <= RangeEnd)
in
#"Lignes filtrées1"
When i extract data from the table "[customer]", all is working correctly with the exception of the field [customer acount.name] and [customer account.Post Code].
I have the feeling that is due to the synthax of the incoming data and consequently Power Bi is not able to treat correctly the data.
I have conducted a quick analysis and i didn't notice any special character.
All the others accounts are working correctly.
Furthermore, the two problemics informations (Customer name & Post code) works very well through an OLAP Cube.
Thank you Sheng for your help