Forum Discussion

SvenJ's avatar
SvenJ
Helper III
4 years ago
Solved

Search for a value in another table

I have a table which has a column called "Konto" and a cell with the value of 8421 in this table.

 

Now i want to search in another table between two columns (Konto von - Konto bis) and give back the value #BWA-Zeile.

How can i do that in Power Query? I know how to do it as a calculated column, but this value is not in Power Query. Can someone help me?

14 Replies

  • Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. 

    Your "Konto von" and "Konto bis" value ranges seem to be overlapping? What would be the expected outcome for Kontonummer 8600 ?

    • SvenJ's avatar
      SvenJ
      Helper III

      I would fill down the column "'#BWA_Zeile", means the result should always the column "BWA_Zeile" - in this case "1017"

      • lbendlin's avatar
        lbendlin
        Super User

        My point is that 8600 should not be present in both ranges.

  • lbendlin This is not a problem - i can fix it to 8599 and start the other line with 8600

    • lbendlin's avatar
      lbendlin
      Super User

      That would be better. Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. 

      • SvenJ's avatar
        SvenJ
        Helper III

        This is the table, where i have the values, which i need called "BWA" - i need the value BWA_Zeile, if the value is between "Konto von" and "Konto bis" 

         

        And i need the value in this table called "Import"

         

         

  • Und an welcher Stelle greift er auf welche Tabelle zu?

      • SvenJ's avatar
        SvenJ
        Helper III

        Many thanks for your help! Vielen lieben Dank!