Search code examples
powerbidaxstudio

Retrieve acolumn name from in underlying dataset (Before it got renamed in Power BI)


I'm trying to build a dynamic data dictionary for my Power BI data set. To do that, I am querying the DMVs in DAX studio to get the objects names and descriptions from the model directly.

Used query for the columns details:

SELECT * from $SYSTEM.TMSCHEMA_COLUMNS

However, when I run this query, I'm getting ExplicitName = SourceColumn. I had assumed that the SoruceColumn would contain the column name before any transformation in PowerQuery. Does anyone have any idea on how to get the original column name (the name of the column in the SQL Server DB per example)?


Solution

  • I have found a solution for this. You can find the technical column names in:

    select * from $SYSTEM.DISCOVER_STORAGE_TABLE_COLUMNS where [COLUMN_TYPE] = 'BASIC_DATA'
    

    If building this type of dynamic data dictionary interests anyone, do let me know. I can share the end result when I'm done.