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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
jpstayfocus
Regular Visitor

Power BI adding. a new column

I manage two tables: one called 'Manager' with columns for Name, Id, LastName, and structuralUnit, and another called 'Employee' with columns for FirstName, LastName, structuralUnit, and EmployerID. I'm interested in enhancing the 'Inventory' table by adding a new column. This column, named 'ManagerID,' would store the ID of the manager for employees who have recently connected. How do i do this in power BI

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

@HotChilli , thanks for your concern about this case. I have some additional information.

 

Hi  @jpstayfocus ,

 

Assuming that there is an Inventory table that can get a direct relationship to "ManagerID" from the A table, you consider using the Related() function.

ManagerID = RELATED('A'[Id])

RELATED function (DAX) - DAX | Microsoft Learn

USERELATIONSHIP function (DAX) - DAX | Microsoft Learn

 

If not, you need to consider the relationship between the three tables, and use an aggregation function such as Sumx() or Maxx() to get the corresponding columns in table B, and then use the columns in table B to get the "ManagerID" in table A.

"ManagerID".

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

HotChilli
Super User
Super User

I make that 3 tables. So it's not clear whether you have 2 or 3 tables and where you are getting the managerID from and what "employees who have recently connected" means.

Can you read this and repost please?

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/2973... 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.