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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

table name prefix

Hi

 

I load all my tables in model from the same SQL DB. In SQL they are all named: "MART.Tablename". When I import the table, in some instances it names the table in Power BI: "Tablename" in other instances (Other tables) it names it "Mart TableName". It seems to be 100% consistent: If I load the same table again it gives it the same name.

 

We use Cube formula for the model (which have many tables, so it is quite confusing that the naming is not consistent.

 

Any ideas? Is it a bug, or something we can change?  

 

7 REPLIES 7
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

In which view or situation do you see the "Tablename" format in Power BI Desktop? Based on my test, when you import tables under MART schema into Power BI, all tables will be named as Mart TableName. If you import tables under dbo schema, all tables will be named as TableName. 


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not 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_DimVendor

 

Does this provide you with any hints?

 

Anonymous
Not applicable

@v-yuezhe-msft

 

Version number: Version: 2.61.5192.601 64-bit (august 2018)

 

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" 

Anonymous
Not applicable

When you create a query in Power BI, you get to name the query, which is what the table will be called in your model.  Power BI often picks a name on your behalf when you choose a datasource.  If you don't like the names chosen, you can alter the table name as part of the Edit Query step of your importing.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors