Przemyslaw Remin
Przemyslaw Remin

Reputation: 6940

Power BI change original table name which is displayed in Daxstudio

I noticed very odd thing that Daxstudio allows you to view original table name. It is a bit niuanse because when you rename table created in M then Daxstudio still refers to it using original table name, not the new name. Here is how to reproduce the bug.

Power BI > Home > Enter Data

add new table

Name the table RedTable.

Run a query in Daxstudio:

EVALUATE
DISTINCT('RedTable'[Column1])

enter image description here

Now rename the table to BlueTable:

enter image description here

And run the query in Daxstudio for a new table name: enter image description here

You can still see the original table name in the Query column of Server Timings.

Is there a way to change this original table name created with M?

I can add that this bug is applicable only to tables created with M (be it Enter Data or plug to Server). This bug is not reproducible with DAX tables. The DAX tables are updated after you change their name and actual (not original) name is display in Query column of Server Timings of Daxstudio.

Upvotes: 0

Views: 3517

Answers (1)

Marco Russo
Marco Russo

Reputation: 179

This is not a problem of DAX Studio, even though we could try to fix it in DAX Studio. :) Here is what happens: the Tabular model (used also by Power BI) has an ID for each object and then a Name. The ID is assigned by the Power BI and Visual Studio UI when you create an entity (table/column/...). Visual Studio shows the ID as a readonly property, whereas Power BI doesn't show that property at all. The ID is used internally to reference the objects in the Tabular Object Model (TOM). It is also used to identify column in the interaction between Formula Engine and Storage Engine. The Storage Engine queries captured by DAX Studio are messages intercepted with a debugging session connected to the Analysis Services session and in these messages the text represents entities (in particular table names) through their ID rather than through the Name property. As Microsoft would say, this is "by design". So far, DAX Studio simply capture the text of the storage engine queries and display this information. However, DAX Studio "massages" the text, removing a lot of "noise" and making the query more readable. During this phase, it is possible to consider renaming IDs with Names. I just created a feature request. That was easy. When to implement the feature, finding the time is much harder!

Upvotes: 1

Related Questions