Forum Discussion
COnditional column comparing many values agains different tables
Hi Community,
hope you can help me with this issue i have.
i would need to create a conditional column comparing information from columns of the same table agains columns of other tables.
Example
I have this table two tables
| TABLE 1 | ||||
| COLUMN 1 | COLUMN 2 | COLUMN 3 | COLUMN 4 | COLUMN 5 |
| A | B | C | D | E |
| TABLE 2 | ||
| AREA 1 | AREA 2 | AREA 3 |
| A | 3 | 5 |
i need to create a new column with the folloing condition:
If column1 of Table1 is equal a Area1 of table2 , AND Column2 of table1 is equal to area2 table, AND column 3 of table1 is equeal to Area3 of Table2 , then YES ; otherwise NO
if this possbile?
Regards
2 Replies
- Mahesh0016
Super User
Table = DISTINCT(UNION(ALL(A[AssectName]),ALL(B[AssectName]),ALL(C[AssectName])))
Then add three columns in combined table , like this:
AssectName A = SWITCH(TRUE(),'Table'[AssectName] in VALUES('A'[AssectName]),"Yes","No")
AssectName B = SWITCH(TRUE(),'Table'[AssectName] in VALUES('B'[AssectName]),"Yes","No")
AssectName C = SWITCH(TRUE(),'Table'[AssectName] in VALUES('C'[AssectName]),"Yes","No")
THANK YOU!!
- PedroPascual
Helper I
Mahesh0016 thanks for the response.
however the result of the condition shall be one value, "yes or no" depending on the results of the comprarisions.
if all of the conditions are yes, then the result is Yes, if just one condition is no, then the single results in "NO".
i would need and prefer to have this formula in the main table.
Regards