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
caduces
New Member

Expression.Error: The name 'Replaced Value3' wasn't recognized. But Expression is missing?

I'm relatively new to using Power Query so I'm confused by this (also, pardon any newbie efficency problems that I'm sure exist).

In my PowerBI desktop client Power Query is giving me the following error:

 

"Expression.Error: The name 'Replaced Value3' wasn't recognized. Make sure it's spelled correctly."

 

However, data loads properly on my desktop and I have no "Replace Value" expressions in the advanced editor.  As a test, I duplicated the query, recreated all the added columns and measures, and the error dissapears.  However, it returns on the copied query if I delete the original query.  I feel like I'm missing something obvious...

 

Advanced Editor reads:

 

 

let
    #"Work Notification New Query" = let
    Source = Excel.Workbook(File.Contents("\\xxxxxx\xxxxxx\xxxxxx\Notification SuperQuery - Original.xlsx"), null, true),
    SAPCrosstab1_DefinedName = Source{[Item="SAPCrosstab1",Kind="DefinedName"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(SAPCrosstab1_DefinedName, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Notification", Int64.Type}, {"Notification Type", type text}, {"Cost Center", type text}, {"Created By User", type text}, {"Creation Date", type date}, {"Last Change Date", type date}, {"Plant Section", type text}, {"Reported By User", type text}, {"Number Of Maint Notif Damages", Int64.Type}}),
    #"Added Conditional Column" = Table.AddColumn(#"Replaced Value3", "Plant Section Long", each if [Plant Section] = "VC" then "Vespa" else if [Plant Section] = "HC" then "HPC" else if [Plant Section] = "FC" then "FCC" else if [Plant Section] = "RC" then "R&D" else if [Plant Section] = "IC" then "Infrastructure" else if [Plant Section] = "LC" then "Logistics" else "Unknown"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Conditional Column",{{"Notification", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type1",{"_1"}),
    #"Changed Type2" = Table.TransformColumnTypes(#"Removed Columns",{{"Creation Date", type date}}),
    #"Added Conditional Column1" = Table.AddColumn(#"Changed Type2", "Safety Notificaiton Numeric", each if [Notification Type] = "Safety Notification" then 1 else null)
in
    #"Changed Type",
    #"Changed Type" = Table.TransformColumnTypes(#"Work Notification New Query",{{"Notification", Int64.Type}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Plant Section Long", each if [Plant Section] = "FC" then "FCC" else if [Plant Section] = "VC" then "Vespa" else if [Plant Section] = "HC" then "HPC" else if [Plant Section] = "IC" then "Infrastructure" else if [Plant Section] = "LC" then "Logistics" else if [Plant Section] = "RC" then "R&D" else null),
    #"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "Custom", each if [Notification Type] = "Safety Notification" then 1 else 0),
    #"Renamed Columns" = Table.RenameColumns(#"Added Conditional Column1",{{"Custom", "Safety Notification Numeric"}})
in
    #"Renamed Columns"

 

 

 

You're collective expertise is appreciated!

 

1 ACCEPTED SOLUTION
jthomson
Solution Sage
Solution Sage

Your fourth line refers to Replaced Value3 as the source for what it's doing, which isn't in your query anywhere. If I was having a guess I would say that there's been some cleaning up of data in the query right before that point which no longer exists, but nobody updated that line to point at the correct part of the query

View solution in original post

2 REPLIES 2
jthomson
Solution Sage
Solution Sage

Your fourth line refers to Replaced Value3 as the source for what it's doing, which isn't in your query anywhere. If I was having a guess I would say that there's been some cleaning up of data in the query right before that point which no longer exists, but nobody updated that line to point at the correct part of the query

It was something obvious! Thank you, sometimes I guess I just need a fresh set of eyes.

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.