Forum Discussion

mira_bella's avatar
mira_bella
Regular Visitor
9 years ago
Solved

Excluding rows based on combinations in another table

Hello,   I have a table with financial transactions: basically Account, Cost_center, and Amount. I need to exclude the rows with certain combinations of Account + Cost_center. Since there are quit...
  • MFelix's avatar
    9 years ago

    Hi mira_bella,

     

    Taking into account that you already did the auxiliary table yo need to do the following:

    1 - Create a custom column in the Exceptions table with Account + Cost_center = ID.

    2 - Create a custom column in the Financial transactions with Account + Cost_center = ID

    With this two columns you can now make a merge between the two tables (vlookup in excel)

    3 - In the Financial transaction choose option to Merge queries and be sure to select the Full outer (all rows from both)

    4 - Chose expand on the column just created and select the ID then

    5 - Filter out all that are not null.

  • mira_bella's avatar
    mira_bella
    9 years ago

    Thank you MFelix! I managed to find the solution without combining columns. I did the "Merge query" selecting both Account and Cost center as matching columns in both tables, and setting the "Left Anti" join type (all rows from  Transactions except those which are also in Exceptions). Seems like it works correctly, comparing the final sums with our main reporting system.

     

    Well that turned out to be easy, just as a newbie I couldn't figure out where to look for this feature :) Hopefully helps someone else.