Forum Discussion

ewuchatka's avatar
ewuchatka
Icon for Helper II rankHelper II
9 years ago
Solved

Add a new column to the existing data set and refresh

Hello

 

I would like to add a new column to the existing data set in Excel and refresh my dashboard.

 

I have already built a dashboard based on the data set and at the moment the only way round it I can see is to build it again from scratch. However, there must be a way round it!

 

Please help :)

 

Thank you

 

Ewa

  • Anonymous's avatar
    Anonymous
    9 years ago

    ewuchatka It is most likely because you are inserting it into the middle... You can do one of two things.

    Easier - put it at the end of the Excel doc, and refresh

    Harder - keep it where it is. Go to Edit Queries -> highlight the query you are working with -> Advanced Editor and you will see the M code that is pulling the data. look at how the other columns are being added, and insert your new column in between the columns that are being pulled. Refresh in query editor, close & apply. And you should be good to go.

27 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    ewuchatka This should just work... Add the column to the Excel file, save, click refresh in Power BI. The new column should appear.

    If you modify a column, then that is a different process.

    • ewuchatka's avatar
      ewuchatka
      Icon for Helper II rankHelper II

      Hi both PavelR Anonymous

       

      It is not working, when I add a new column in the middle of the data set, I save it and refresh my Power BI I get an error:

       

      "Expression.Error: The Column "Column 31" of the table wasn't found."

       

       

      Any ideas?

       

      Thanks

       

      Ewa

       

      Ewa

       

       

       

       

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        ewuchatka It is most likely because you are inserting it into the middle... You can do one of two things.

        Easier - put it at the end of the Excel doc, and refresh

        Harder - keep it where it is. Go to Edit Queries -> highlight the query you are working with -> Advanced Editor and you will see the M code that is pulling the data. look at how the other columns are being added, and insert your new column in between the columns that are being pulled. Refresh in query editor, close & apply. And you should be good to go.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi All,

     

    I am having the same problem with a power BI dashboard and the solution mentioned in this thread do not appear to fix the issue, I am using the September 2017 update of Power BI Professional.

     

    1. My existing dashboard works just fine

    2. Added a new column TO THE END (not inserted in the middle) of the existing excel spreadsheet source and refreshed

    3. Did a refresh no notification of any errors with the refresh

    4. New Column does not appear in the DATA view of Power BI and new data item does not appear in the FIELDS Listing to the right

    5. I tried editing the query just in case it had updated the new data column but was not displaying it but I get a "Data not found" error when I do this.

     

    So to summarise adding a new column of populated data to the end of a dashboard source excel spreadsheet does not appear to be imported into the Power BI database on refresh. Like the original poster I do not want to have to rebuild the entire dashboard

     

    HELP! :)

     

    • san_jois's avatar
      san_jois
      Icon for Resolver I rankResolver I

      Hi,

      I have defined my arranged data in excel worksheet as a table and have linked only the table (with given name) to the PBI file.

      I have no issues even when I add columns in between existing columns. This may be because the table itself accepts the new column as its integral part and accordingly, the same is there to refer in PBI.

      Hope this solves the issue

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi san_jois,

         

        Thanks for the prompt feedback when you say:

         

        "I have defined my arranged data in excel worksheet as a table and have linked only the table (with given name) to the PBI file."

         

        1. What steps do I need to perform to define an excel spreadsheet as a table and link it to the PBI file?

        2. If I do this will it mean my data source essentially changes and so I will have to rebuild my dashboard?

        3. Why doesnt the standard refresh work? Is this a known issue? When you refresh PBI appears to look at the source data file but only for changes in the data items that were originally imported, in my hands it doesnt pick up things like new columns added surely that cant be sensible?

         

        If you can provide the additional info I will give your method a try

  • Can anyone tell me how to fix the same issue but considering that i am loading data from a folder and not directly from an excel. Tks