Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |