Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
Im trying to create a new column that returns a value from another table based on condition / filter.
As you see I have the following 2 tables. I want to create a new column in Table 2, in that column I need to return the "Sales Person" of the first Log_ID.
(Note: in my relationship model there is an Inactive relationship by "Acct Nr.")
Solved! Go to Solution.
Hi @hassanh_2
Please try
NewColumn =
MAXX (
TOPN (
1,
CALCULATETABLE ( Table2, USERELATIONSHIP ( Table1[Acct Nr], Table2[Acct Nr] ) ),
Table2[Log_ID], ASC
),
Table2[Sales Person]
)
Is there a way though to create it as a Column so I can use it as a Parameter dimension in other visuals?
What is the direction of the relationship between the two tables? Can you provide a screenshot?
I created the same function as a measure and it worked. Thank you!
Hi @hassanh_2
Please try
NewColumn =
MAXX (
TOPN (
1,
CALCULATETABLE ( Table2, USERELATIONSHIP ( Table1[Acct Nr], Table2[Acct Nr] ) ),
Table2[Log_ID], ASC
),
Table2[Sales Person]
)
Hi, Thanks!
It seems you switched the Table Numbers but I tried both ways and the new column didnt return any value!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |