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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

I need a help on a simple query

Hi EveryBody,

I have 2 tables

 

'Promotion' Table

 

Id      IdTransaction   CodePromo          

 

 1           1011           A

 2           1012           A

 3           1013           B

 4           1014           C

 5           1015           A

 6           1016           B

 7           1017           C

 

And 'Group' Table

 

IdPerson     IdTransaction

 

13111         1011

13111         1012

13112         1013

13112         1014

13113         1015

13113         1016

13113         1017

 

I want a formula that add a new column [Idperson] in Promotion table

 Thank's a lot

2 ACCEPTED SOLUTIONS
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

You may add a calculated column as below:

Column =
LOOKUPVALUE (
    'Group'[IdPerson],
    'Group'[IdTransaction], Promotion[IdTransaction]
)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

 

If there will never be repetitions in the idTransactions column of the Group Table, then you can create a relationship from the idTransactions column of the Promotion Table to the idTransactions column of the Group Table.  Then write this calculated column formula in the Promotion Table

 

=RELATED([Group[idPerson])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

If there will never be repetitions in the idTransactions column of the Group Table, then you can create a relationship from the idTransactions column of the Promotion Table to the idTransactions column of the Group Table.  Then write this calculated column formula in the Promotion Table

 

=RELATED([Group[idPerson])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

You may add a calculated column as below:

Column =
LOOKUPVALUE (
    'Group'[IdPerson],
    'Group'[IdTransaction], Promotion[IdTransaction]
)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous,

 

Why don't you create a Relationship based on IdTransaction?

 

It will give the same output that what are looking for now.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors