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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
E5254730
Helper II
Helper II

How to create relationship between 2 tables having same columns in both tables

Hello,

Trying to attach excel for your reference, but do not see the option of upload

Below is the output I'm looking to achieve.

E5254730_0-1717682847092.png

My both the tables has same columns. In Current week - line of data will be more than in Previous week.

Tried creating a Date table and creating a relationship with Achieved Date into my tables, but does not gives correct output.

 

Appreciate if someone can direct to achieve this. Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @E5254730 

 

I would like to apologize for the belated reply.

 

You can try the following:

 

1. Create a calculated table as follows:

Table = VALUES('Current week table'[Category])

 

vxuxinyimsft_0-1718862803157.png

 

2. Create relationships as follow

vxuxinyimsft_1-1718862861135.png

 

vxuxinyimsft_2-1718862886357.png

 

Output:

vxuxinyimsft_3-1718862931928.png

 

You can also make changes to the column names. Double-click the corresponding column.

vxuxinyimsft_4-1718862985411.png

 

vxuxinyimsft_6-1718863128948.png

 

Best Regards,
Yulia Xu

 

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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @E5254730 

 

If I understand you correctly, you have two tables, one with last week's data and the other with this week's data? And then you want to display them in the same table? Could you please provide some data so that I can help you better?

How to provide sample data in the Power BI Forum - Microsoft Fabric Community Or show them as screenshots. Please remove any sensitive data in advance. 

 

Best Regards,
Yulia Xu

I've added a small set of data in table format. But this is not properly showing in table format.

Sending the screen shot as well:

Prior Week:

E5254730_0-1718089845961.png

 

Current Week:

E5254730_1-1718089877363.png

 

Anonymous
Not applicable

Hi @E5254730 

 

I would like to apologize for the belated reply.

 

You can try the following:

 

1. Create a calculated table as follows:

Table = VALUES('Current week table'[Category])

 

vxuxinyimsft_0-1718862803157.png

 

2. Create relationships as follow

vxuxinyimsft_1-1718862861135.png

 

vxuxinyimsft_2-1718862886357.png

 

Output:

vxuxinyimsft_3-1718862931928.png

 

You can also make changes to the column names. Double-click the corresponding column.

vxuxinyimsft_4-1718862985411.png

 

vxuxinyimsft_6-1718863128948.png

 

Best Regards,
Yulia Xu

 

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

Thanks!

This gives the desired output.

But I'm assuming, apart from Category column, if there are other columns, say - Status Column, I'll have to create another table similar to Category table and create a relationship

 

Thanks, once again.

Prior Week Table:

 

IDAchieved DateSales (USD)Category
8831611-Jan-2022 $                37,702.00A
6439621-Jan-2022 $                22,896.00A
8666004-Feb-2022 $                22,202.00B
5171822-Feb-2022 $                19,195.00B
5434425-Feb-2022 $                28,376.00C
6729104-Mar-2022 $                42,044.00C
6419114-Mar-2022 $                45,887.00D
8523610-Mar-2022 $                10,272.00E
8522905-Apr-2022 $                44,270.00E

 

Current week table:

 

IDAchieved DateSales (USD)Category
8831611-Jan-2022 $                                           47,993.00A
6439621-Jan-2022 $                                           34,688.00A
8666004-Feb-2022 $                                           42,617.00B
5171822-Feb-2022 $                                           15,649.00B
5434425-Feb-2022 $                                           10,971.00C
6729104-Mar-2022 $                                             8,434.00D
6419114-Mar-2022 $                                             6,933.00D
8523610-Mar-2022 $                                             3,709.00E
8522905-Apr-2022 $                                             7,661.00E
5971629-Mar-2022 $                                             8,079.00E

 

Below is the output from both the tables. I also created unique no's from ID column, yet no luck

 

E5254730_1-1717745123640.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.