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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
drrai66
Resolver I
Resolver I

Need Help On Creating a Column from two linked Data sources

Hi Guys,

I really Need Help Here to Convert This in Tableau to Power BI. Scenario is If I have two Tables In Tableau  Like:

 

Table1

 

Student Marks
A80
B90
C100
D50
E45

 

and 

Student Age
A12
B13
C14

 

and I bulid Relationship in Tableau on Student then I would write a Calculation Such as

 

IF (ATTR(Student from Source 1)=ATTR(Student from Source2) THEN 1 ELSE 0 END

 This would  Return a Column  In Table 1 as

 

Student MarksResult
A801
B901
C1001
D500
E450

 

Please give me equivalent formula in Power BI

 

Thanks

Deepak

1 ACCEPTED SOLUTION
Nishantjain
Continued Contributor
Continued Contributor

Create a calculated column in Table1 using the formula below

 

if(calculate(countrows(table2),filter(table2,table2[Student]=table1[Student]))>0,1,0)

View solution in original post

3 REPLIES 3
v-xjiin-msft
Solution Sage
Solution Sage

Hi @drrai66,

 

To achieve your requirement, you can try this:

 

1. Create a relationship between Source1 and Souce2.

2. Create a measure like:

 

Result =
IF ( ISBLANK ( CALCULATE ( MAX ( Source2[Age] ) ) ), 0, 1 )

11.PNG22.PNG

 

Thanks,
Xi Jin.

Yours Solution Looks pretty good, but the first formula gave me what I needed in my Actual Data set. Thanks for your Time !!!

Deepak

Nishantjain
Continued Contributor
Continued Contributor

Create a calculated column in Table1 using the formula below

 

if(calculate(countrows(table2),filter(table2,table2[Student]=table1[Student]))>0,1,0)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.