Forum Discussion
pbrekelmans
8 years agoNew Member
Unique values from two columns
Hello all, I'm still fairly new to this piece of software, but greatly impressed by the possibilities it has given, especially because i have a lack of real knowlegde on this matter. This forum h...
- 8 years ago
You may add a calculated table as follows.
Table = DISTINCT ( UNION ( SELECTCOLUMNS ( Table1, "object number", Table1[consumed by (object number)] ), VALUES ( Table2[client with problem (object number)] ) ) )
pbrekelmans
8 years agoNew Member
I don't think the index column will help me now. But i can show you some purely fictional tables that represent the "problem" (see below). I cannot connect table 1 and 2 because they have more than 1 value for some lines. I think i need to make a new list with unique values (table/list 3) to tackle this.
| Table 1 | ||
| date | dinner | consumed by (object number) |
| 1-1-2018 | Salisbury Steaks | 3223 |
| 1-3-2018 | Beef Stroganoff | 2551 |
| 1-4-2018 | Tacos | 3223 |
| 1-5-2018 | taco salad | 1221 |
| 1-7-2018 | chicken fajaitas | 2551 |
| Table 2 | ||
| date | client with problem (object number) | problem |
| 21-feb | 4562 | headache |
| 3-feb | 1221 | opstipation |
| 5-aug | 2551 | blurry view |
| 1-mrt | 2551 | frozen shoulder |
| 1-jun | 3223 | weak knees |
| Table 3 (to be) | ||
| Object number | ||
| 3223 | ||
| 2551 | ||
| 1221 | ||
| 4562 |
v-chuncz-msft
8 years agoCommunity Support
You may add a calculated table as follows.
Table =
DISTINCT (
UNION (
SELECTCOLUMNS ( Table1, "object number", Table1[consumed by (object number)] ),
VALUES ( Table2[client with problem (object number)] )
)
)