cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brogers Frequent Visitor
Frequent Visitor

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

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

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.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

brogers Frequent Visitor
Frequent Visitor

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

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
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Top Kudoed Authors
Users Online
Currently online: 140 members 1,611 guests
Please welcome our newest community members: