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
ccmaomao
Frequent Visitor

Connect two tables with order dates and SKU numbers to form a visual chart on one visual

Hi there, 

 

I am combining two tables together, and want to keep all the data in both tables.

 

One is an order summary table:

Order DateSKU NbrOrder Qty
1/1/2020A20
2/4/2020B10
1/3/2020D20

 

The other one is a summary of the planned order:

Planned Order DateSKU NbrPlanned Order Qty
1/4/2020B20
2/4/2020C10
3/4/2020D20

 

We want to put them in a chart comparing the order quantity and the axis will be the Date. So both SKU Nbr and order date need to be connected, but Power BI could not do multiple relationships between two tables. Since the order dates and SKUs numbers are not matching for each row, Concat will make me lose data rows.

 

Does anyone have any idea how to combine the two tables on SKU number and order date and keep all the information?

 

Thanks!

CC

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ccmaomao , You can create a common date and SKU and use these dimensions to analyze.

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

Common Table - https://www.youtube.com/watch?v=Bkf35Roman8

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@ccmaomao , You can create a common date and SKU and use these dimensions to analyze.

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

Common Table - https://www.youtube.com/watch?v=Bkf35Roman8

Solved it. Thanks 🙂

Hi Amit,

 

Thanks for your reply and the videos. 

 

Shall I do the following based on your suggestions and video?

 

A bridging table with all distinct SKU number and connect to the two tables,

and another briding table with distinct date and connect to the two tables?

 

Thanks a lot!!!!

CC

jthomson
Solution Sage
Solution Sage

Make custom columns in each table in Power Query which look something like Text.From([Order Date])&"_"&[SKU Nbr] and link using that?

Thanks, jthomas!

 

Will concat the two keys and then join keep all the information, or it is a inner join?

 

Thanks,

CC

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.