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

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 360 members 4,294 guests
Please welcome our newest community members: