Forum Discussion

brogers's avatar
brogers
New Member
7 years ago

Worksheet with multiple tables, but two different heards that has caused an error

Hello everyone,

 

I am very new to PBI and I tried to find another post similiar to my problem.  When I created my worksheet that has multiple pages I did not verity that all the headers were identical.  once I loaded the worksheet I noted that  I had Monthly hours and a new column Monthly Hours 2.  The Monthly Hours 2 is due to not verifying that all data was identical, I changed the columns  in my worksheet to Monthly hours and now I am getting the error:

 

An error occurred in the ‘QTS 3’ query. Expression.Error: The column 'Monthly Hours' of the table wasn't found.
Details:
    Monthly Hours

 

Can someone walk me through how to  correct this?

 

Thankd

 

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    So, you are going to need to walk through the steps of your QTS 3 query and figure out which one is referencing the old column name. Often, this is a "Changed type" step. The easiest way to do this in my opinion is to open up the Advanced Editor and do a Ctrl-A to select all, Ctrl-C to copy and paste it into Notepad. Do a search for the old column name and replace it with the new column name. Ctrl-A, Ctrl-C in Notepad, open up Advanced Editor, Ctrl-A, Ctrl-V to replace everything. Done.

    • brogers's avatar
      brogers
      New Member

      Thanks for responding so quickly, I dont see anything  here that  calls out the Monthy Hours.  The worksheet had Monthly hours and Monthly Hours and when I got the data PBI greated two columns.  I changed all the pages to have Monthly hours. 

       

      I dont see the Monthly  Hours in here but I do see QTS, any further suggestions?

       

       

       

      Source = Table.Combine({#"QTS 3", ATN, #"ATN Bluebird", ATN4B, Bluebird, #"FRC Row", #"FRC3B & 3C", NAO, PNB, #"PNB 3&4"}),

         #"Renamed Columns" = Table.RenameColumns(Source,{{"Month", "Date"}}),

         #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type date}}),

         #"Duplicated Column" = Table.DuplicateColumn(#"Changed Type1", "Date", "Date - Copy"),

         #"Renamed Columns1" = Table.RenameColumns(#"Duplicated Column",{{"Date - Copy", "Date.Year"}}),

         #"Extracted Year" = Table.TransformColumns(#"Renamed Columns1",{{"Date.Year", Date.Year, Int64.Type}}),

         #"Changed Type" = Table.TransformColumnTypes(#"Extracted Year",{{"**bleep**/LTIR", type number}, {"Running IR", type number}, {"Current yeat LT Rate", type number}, {"Monthly Recordable Rate", type number}, {"Monthly LTR", type number}, {"**bleep**/LTIR", type number}, {"Loss Time", Int64.Type}}),

         #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Loss Time", "Column20"})

      in

         #"Removed Columns"