Forum Discussion

RE's avatar
RE
Helper I
9 years ago

add column to existing data model

Due to some changes in my organization, there is a need to add columns an existing data model. I am wondering if there is a way to add these coulmns to the model through the query editor. 

 

To my knoweldge, the only other way would be to build the data model from scratch. 

10 Replies

  • dseppi's avatar
    dseppi
    Frequent Visitor

    I think I understand what you are asking because I just ran into the same issue.  If you go to the table view, click on home in the task bar, click on edit quieries, then click on edit queries in the drop down, then click on add items in the top left you should be able to add a new column from an outside data source.  

     

    Hope that helps.

  • PavelR's avatar
    PavelR
    Solution Specialist

    RE

    as you say, just through Query editor. You don't have to create it from scratch just because of adding one column to data model.

     

    Regards

    Pavel

    • RE's avatar
      RE
      Helper I

      How can this be done exactly?

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    If you didn't filter your columns in the query, the new columns should show up in the data model when you refresh the data from the source (assuming this is where the columns were added. If you need to add them to the actual data model itself, you can use calculated columns in the query editor or in the data model itself using DAX.

    • RE's avatar
      RE
      Helper I

      I should have mesntioned this in the beginning but the columns I would need to add will come from Dynamics CRM. Is there still a way to connect to that data source through the query editior and add the columns to the already existant table? If so, how? 

       

      Thanks!

      • parry2k's avatar
        parry2k
        Super User

        If you add columns to your data source (regardless Dynamics CRM), and refresh your query, it will bring new columns. Did you tried this? 

  • ivank's avatar
    ivank
    Regular Visitor

    => Refresh DataModel

    => PowerPivot->Design->Table Properties -> Tick the new columns you need to add -> Save.

    => Done (hopefully)

  • ivank's avatar
    ivank
    Regular Visitor

    => Refresh DataModel

    => Go to datamodel ->Design->Table Properties -> Tick the new columns you need to add -> Save.

    => Done (hopefully)

  • alienlin's avatar
    alienlin
    Frequent Visitor

    I encountered the same problem and finally found out how to add a new column in the existing data model:

    Click 'Edit Queries' > Manage > Add items

    then select the fields you want to add and click OK. 

     

    • MattRasmussen's avatar
      MattRasmussen
      Helper I

      In 2022, the navigation to do this has changed.  I had this issue as well - we added new columns to the source table and required them to be added in our Power BI data model.  Searching the help files only talked about adding custom columns, then I found this thread.  Here's the navigation that I used:

      1) Click on the Model tab.

      2) Click the Transform Data button in the ribbon - the Power Query Editor will open.

      3) Click the Choose Columns button in the ribbon - the Choose Columns dialog will open.

      4) By default, all columns are already selected.  You can click the OK button or deselect the columns you may not want in your Power BI data model as you see fit.

      5) Click the Close & Apply button in the ribbon to close the Power Query Editor.

      6) Save your work.