Forum Discussion
Anonymous
3 years agoNot applicable
creating new table based on two table condition
There are two tables A and B and I want to merge below tables into the new one with subjects when IEYN and NSYN =yes.
The below dax which i created combining both yes and no subjects
EligibleSubjects =
UNION(
SELECTCOLUMNS(
FILTER('Subject Eligibility', 'Subject Eligibility'[IEYN] = "Yes"),
"Subject", 'Subject Eligibility'[Subject]
),
SELECTCOLUMNS(
FILTER('Treatment Period Inclusion Criteria', 'Treatment Period Inclusion Criteria'[NS_DSELIGYN] = "Yes"),
"Subject", 'Treatment Period Inclusion Criteria'[Subject]
)
)
| Table A | |
| Subject | IEYN |
| Subject 1 | Yes |
| Subject 2 | Yes |
| Subject 3 | Yes |
| Subject 4 | Yes |
| Subject 5 | No |
| Table B | |
| Subject | NSYN |
| Subject 1 | Yes |
| Subject 2 | Yes |
| Subject 3 | Yes |
| Subject 4 | No |
| Subject 5 | Yes |
3 Replies
- amitchandakSuper User
Anonymous , what if the issue ?
You can try like
filter(Union(TableA, TableB), [IEYN] ="Yes")
- AnonymousNot applicable
Thanks Amit. There are other columns in the tables so i want just the subjects of the both tables in the new table with condition [IEYN] ="Yes" (Table A) and NSYN = "Yes" (Table B)
- FreemanZSuper User
hi Anonymous
try replacing FILTER with CALCULATETABLE