Forum Discussion

olimilo's avatar
olimilo
Post Prodigy
4 years ago
Solved

Trying to have multiple steps in one variable, getting error

Hi everyone, I was trying to add another step to the result variable from this code here but kept running into the error: "The name 'result' wasn't recognized." I'd like to know how to properly corr...
  • Anonymous's avatar
    Anonymous
    4 years ago

    try to change this parte of you code from:

     

    result =
                let
                    CSCountryCleanup = Table.ReplaceValue(InputTable, CSCountry{ActualRow}[CS], CSCountry{ActualRow}[Country], Replacer.ReplaceValue, {ColumnName}),
                    QTCountryCleanup = Table.ReplaceValue(CSCountryCleanup, QTCountry{ActualRow}[QT], QTCountry{ActualRow}[Country], Replacer.ReplaceValue, {ColumnName})
                in result,

     

    to:

    result =
                let
                    CSCountryCleanup = Table.ReplaceValue(InputTable, CSCountry{ActualRow}[CS], CSCountry{ActualRow}[Country], Replacer.ReplaceValue, {ColumnName}),
                    QTCountryCleanup = Table.ReplaceValue(CSCountryCleanup, QTCountry{ActualRow}[QT], QTCountry{ActualRow}[Country], Replacer.ReplaceValue, {ColumnName})
                in QTCountryCleanup,