Share via

Transform a logic statement by row into a flat list of relationships between attributes

Anonymous
2023-08-28T12:01:50+00:00

I have an excel file with a set of rules with different boolean logic.

For example, the data looks something like

Condition Rule And/Or ( Source External Field or Condition Rule Relational Operator Comparison Value ) Rev ID Revenue Category CC ID Cost Center
Rule 1 And ( Cost Center is not empty Not Empty )
Rule 1 And ( Cost Center not in the selection list Delivery - Cost Of Sales ) PC_4300 Delivery - Cost Of Sales
Rule 1 And ( Cost Center not in the selection list Delivery  - Revenue ) PC_4500 Delivery  - Revenue
Rule 1 And ( Revenue Category in the selection list Delivery Bags ) REV-0066 Delivery Bags

I would like to transform this set of rules into a simplified flat table/list like below:

Condition Rule Rev ID Revenue Category CC ID Cost Center
Rule 1 REV-0066 Delivery Bags PC_4300 Delivery - Cost Of Sales
Rule 1 REV-0066 Delivery Bags PC_4500 Delivery  - Revenue

In this way, a user could filter the list by either Cost Center or Revenue category and find all allowed members of each others dimensions. I've tried google searching 'multiplying attributes across columns' but no luck in finding a solution. Is there a way to do this in excel or Power Query?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments