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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
r_user
New Member

Power BI - Get value from a different table

Hi Community,

 

I was wondering if it is possible to do the following:

I have two tables in PowerBI, one called "Project Overview" and another called "Project X".

In the "Project Overview" table I want to create a custom column, called "Project start date", and that information is in a column inside the table "Project X".

Also, there is a column called "Project Name" in the table "Project Overview" with the name of that table with details about the project. In this example, the value in that column is "Project X".

 

At the moment I can get that information by using:

#"Project X"[Start Date]{0}

 

However, I can have mutiple projects in the table "Project overview" and I wanted to get that value dynamically.

 

Is there a way to archive that? Basically get the value from column "Project Name" and then look for a table with the same name and get the value in column "Start Date"?

 

Thank you all in advance.

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @r_user ,

What is your data source? If it's an Excel workbook, you can filter out all the Project x tables in the Source step and append them as one table.

vcgaomsft_0-1681797546734.png

Create a new blank query --> paste the m-code of Source step --> Filter the Name column and expand columns and remove the unwanted columns --> result.

vcgaomsft_1-1681797770560.png

vcgaomsft_2-1681797837590.png

vcgaomsft_3-1681797903098.png

At this point, you can use the merge query to get the start date of each project.

vcgaomsft_4-1681797999005.png

 

 

If this is not the case, and each Project table has project information only in the table name, you will have to consider adding a custom column for the project name and then repeat the above steps.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

amitchandak
Super User
Super User

@r_user , with the description, seems like you can have 1 to Many join between project X and Project overview

 

If you can have one to many join

 

then you can have a new column in DAX in project overview

 

related('Project X'[Start Date])

 

For any type of join

 

maxX(filter('Project X', 'project Overview'[project name]= 'Project X'[project name] ), 'Project X'[Start Date])

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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