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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Arete
Helper I
Helper I

Creating a column that shows related record ID

Hi, I'm stuck on a problem and love that there's a community that can help!

 

I have a table that contains a column of related record IDs

 

IDTeam1_ID
Project_01Project_03
Project_02 
Project_03 

 

I'd like to create a new column that shows the inverse, for example:

 

IDTeam1_IDDesired Column
Project_01Project_03 
Project_02  
Project_03 Project_01

 

I'm pretty new to DAX so any suggestions are appreciated!

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

If you know that there will only ever be 1 entry for an ID in the Team 1 ID column then you could use

Desired Column =
VAR CurrentID = 'Table'[ID]
RETURN
    LOOKUPVALUE ( 'Table'[ID], 'Table'[Team 1 ID], CurrentID )

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

If you know that there will only ever be 1 entry for an ID in the Team 1 ID column then you could use

Desired Column =
VAR CurrentID = 'Table'[ID]
RETURN
    LOOKUPVALUE ( 'Table'[ID], 'Table'[Team 1 ID], CurrentID )

This worked perfectly! Thanks for the help 🙂

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1668681614937.png

 

 

Desired CC =
MAXX ( FILTER ( Data, Data[Team1_ID] = EARLIER ( Data[ID] ) ), Data[ID] )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.