Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Kiranbc
Helper I
Helper I

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 
SubjectIEYN
Subject 1Yes
Subject 2Yes
Subject 3Yes
Subject 4Yes
Subject 5No
  
Table B
Subject NSYN
Subject 1Yes
Subject 2Yes
Subject 3Yes
Subject 4No
Subject 5Yes
3 REPLIES 3
FreemanZ
Super User
Super User

hi @Kiranbc 

try replacing FILTER with CALCULATETABLE

amitchandak
Super User
Super User

@Kiranbc , what if the issue ?

 

You can try like 

 

filter(Union(TableA, TableB), [IEYN] ="Yes")

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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)

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.