Forum Discussion
New column based on another table content
Hi-
Problem
I have two tables, table 1 is the main 'master table' and table 2 is an update table.
Essetially data is recorded in table 2 as a change log and tracks updates made in the first table.
Table 1
Table 2
Solution
What I would like to be able to do is create a new column on table 1 that gives a true value if the Risk ID in table one is in Table 2.
This has to be an additional column to the table.
so something like
| R01 | TRUE |
| R02 | FALSE |
| R03 | FALSE |
| R04 | FALSE |
| R05 | FALSE |
Anonymous , A new column in Table 1
New column =
var _cnt = countx(filter(Table2, Table2[ID] = Table1[ID]), Table1[ID])
return
if(isblank(_cnt), "Yes", "No")
2 Replies
- amitchandakSuper User
Anonymous , A new column in Table 1
New column =
var _cnt = countx(filter(Table2, Table2[ID] = Table1[ID]), Table1[ID])
return
if(isblank(_cnt), "Yes", "No")
- AnonymousNot applicable
Thanks that works really well.