Forum Discussion
film20j
8 years agoFrequent Visitor
How to calculate a table with only transactions between countries(and not within country or state)
I am trying to find a way to separate trades between 2 countries and exclude trade with a country
Lets say I have countrues A , B and C
within each countries there are states AA, AB, .... CA , CB, ....
State 1 State 2 Quantity
| All transactions | ||
| AA | AA | 0.1 |
| AB | AB | 0.2 |
| AC | AB | 0.15 |
| AD | CC | 0.3 |
| AE | CE | 0.05 |
| BB | BC | 0.01 |
| BC | BB | 0.2 |
| BD | AB | 0.3 |
| CA | CA | 0.2 |
| CB | CA | 0.5 |
| CC | BB | 0.2 |
| CD | BB | 0.1 |
| CE | BB | 0.05 |
| CF | CA | 0 |
| CG | AA | 0.2 |
| CH | AB | 0.15 |
My table above has all the transactions
The trasactions i want to keep are the the ones between countries
State 1 State 2 Quantity
| Transactions between countries | ||
| AD | CC | 0.3 |
| AE | CE | 0.05 |
| BD | AB | 0.3 |
| CC | BB | 0.2 |
| CD | BB | 0.1 |
| CE | BB | 0.05 |
| CG | AA | 0.2 |
| CH | AB | 0.15 |
2 Replies
- v-chuncz-msft
Community Support
Just add a calculated column.
Column = LEFT ( Table1[State 1], 1 ) = LEFT ( Table1[State 2], 1 )
- film20jFrequent Visitor
That would work indeed if countries where really named A, B, C, .... :(