Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Excluding rows based on combinations in another table

$
0
0

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 quite many, and there's no sensible logic in their numbering/naming, I decided to put the list of exceptions in another table, which would be just two columns: Account and Cost_center. (both relate as many to many, so the same Account is many times in the list and the same Cost center is many times in the list, but each combination is unique)

Then I need a function, which would look for matching combination in "Exceptions" for each row of my "Transactions" table. If it matches, the row should be excluded (or maybe just marked as "excluded" in additional column, which I then can use as filter) 

 

I'm new to PowerBI and "learning by doing" on my own, so I don't quite know how to do this in a better way. 

Adding a new query which will compare the tables and exclude rows?  

Or adding a searching function somewhere, which I then call in my calculation of a new column? somth like

IF exception_search=true then excluded_row=Yes.

 

But where and how to write such function/query? I'm not quite familiar with the syntax in PowerBI. I would be thankful for advice and code examples, or maybe just recommend me a link where to read..


Viewing all articles
Browse latest Browse all 213819

Trending Articles