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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Denis1
Frequent Visitor

How to add columns from two different tables for each month

I am new to Power BI and have not been able to find the answer to what is a simple question. I wish to add columns which are on different data tables, for every month. So far I have only been able to reference a column in a different table by getting a sum of the entire column. However, I want to add the January 2014 (Table1[Column1] to the January 2014 (Table 2[Column 1]). Can anybody help or point me in the right direction to find the answer?

2 REPLIES 2
Eric_Zhang
Employee
Employee


@Denis1 wrote:

I am new to Power BI and have not been able to find the answer to what is a simple question. I wish to add columns which are on different data tables, for every month. So far I have only been able to reference a column in a different table by getting a sum of the entire column. However, I want to add the January 2014 (Table1[Column1] to the January 2014 (Table 2[Column 1]). Can anybody help or point me in the right direction to find the answer?


@Denis1

It depends on the relationship between those two tables. In one:many relationship, in the one table, you would have to "sum(relatedtable(tableMany[column]))" while in the many table the column can be referenced as "related(tableOne[column])".

 

Please be more specific on your scenario.

Greg_Deckler
Super User
Super User

Can you post some sample data and then an example of what you are trying to achieve? If you have two tables that have columns, you will need some sort of relationship between those tables so that Power BI knows which rows from which tables to put in the same row. If there is no common column to build a relationship on and you just want them in order, then create an Index Column in your query for each table and then use that as your relationship. Once you have that relationship, you can just build a table visual that has both columns in it.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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