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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.