Forum Discussion
table name prefix
Hi Lydia
Unfortunately it is not the case in this instance. Since I wrote yesterday, I have tested it by loading the same table in my current model and in a new blank model. In the former case it names it without "Mart" and in the latter case it uses "Mart" as prefix.
According to my client there haven't been any changes in the SQL setup. So it seems strange? Any idea to what can be wrong?
Anonymous,
What version of Power BI Desktop do you use? Could you please post the SQL script that you use to create these tables so that I can test?
Regards,
Lydia
- Anonymous7 years agoNot applicable
Hi again
Both tables are in Mart Schema in SQL.
1. This is the script in Advanced Editor for the one without "Mart"-prefix:
let
Source = Sql.Database("server", "Financials", [Query="SELECT [mart].[DimVersion].* #(tab)#(tab)FROM [mart].[DimVersion]"]),
#"Renamed Columns" = Table.RenameColumns(Source, {{"VersionKey", "VersionKey"}, {"VersionName", "VersionName"}, {"Type", "Type"}, {"VersionDate", "VersionDate"}, {"VersionCurrent", "VersionCurrent"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns", {{"VersionKey", Int64.Type}, {"VersionName", type text}, {"Type", type text}, {"VersionDate", type datetime}, {"VersionCurrent", Int64.Type}})
in
#"Changed Type"2. This is the script in AE for the one with the Mart Prefix:
let
Source = Sql.Database("server", "Financials"),
mart_DimVendor = Source{[Schema="mart",Item="DimVendor"]}[Data]
in
mart_DimVendorDoes this provide you with any hints?
- Anonymous7 years agoNot applicable
Anonymous
Version number: Version: 2.61.5192.601 64-bit (august 2018)
- mjjuk7 years agoHelper I
did this ever get resolved??
I am having the same issue - since building a report and creating new measures etc the query has decidedd to remove the table prefix - now the modification steps do not work and if I do chenge them the report once refreshed breaks all the visuals as they are referenceing the "tablename.columnname"