Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 |
| A | 80 |
| B | 90 |
| C | 100 |
| D | 50 |
| E | 45 |
and
| Student | Age |
| A | 12 |
| B | 13 |
| C | 14 |
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 | Marks | Result |
| A | 80 | 1 |
| B | 90 | 1 |
| C | 100 | 1 |
| D | 50 | 0 |
| E | 45 | 0 |
Please give me equivalent formula in Power BI
Thanks
Deepak
Solved! Go to Solution.
Create a calculated column in Table1 using the formula below
if(calculate(countrows(table2),filter(table2,table2[Student]=table1[Student]))>0,1,0)
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 )
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
Create a calculated column in Table1 using the formula below
if(calculate(countrows(table2),filter(table2,table2[Student]=table1[Student]))>0,1,0)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 36 | |
| 32 | |
| 31 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 86 | |
| 85 | |
| 68 | |
| 64 |