Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
brogers
New Member

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 2
Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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"

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors