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
cocomy
Resolver I
Resolver I

Merge tables

Hi All,

 

I still can't figure out how to build relationship.

 

I have two tables

 

Table 1 - daily forecast by items(500 records)

  • Daily calender
  • Daily sales forecast
  • Items A B C ...

 

Table 2 - actual sales by items(300 records)

  • Date
  • Actual sales
  • Items A B C....

How we recode date is... like this. If no sales on the day, no recode.

1 Feb 2018    A     2kg

1 Feb 2018    A     1kg

1 Feb 2018    B      3kg

2 Feb 2018    C      2kg

3 Feb 2018    A      1kg

3 Feb 2018    C      2kg

5 Feb 2018    B       1kg

 

When I merge table 1 and 2, new table C only shows 300 records. How can I set up to show 500 records even empty?

 

I assume this must be something about relationship? Please advise!

 

All the best,

coco

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @cocomy

You're welcome, it's my pleasure to help you. Could you please mark the right reply for original issue as answer, so more people will get helpful information from here. 

Thanks,

Angelia

View solution in original post

5 REPLIES 5
stretcharm
Memorable Member
Memorable Member

if your doing the join in the Query editor there are you can do left outer join as part of the merge.

 

If your doing it in dax try creating a new table with NATURALLEFTOUTERJOIN

the https://msdn.microsoft.com/en-us/library/dn802527.aspx

 

Relationships do inner joins so you don't see rows that dont have a matching entry.

 

Here is a nice powerbi that shows the different join types

https://community.powerbi.com/t5/Data-Stories-Gallery/Visualizing-Merge-Join-Types-in-Power-BI/m-p/2...

 

Thank you for your advice. It worked perfectly but I realised my original data was incorrect before merging it and wonder if you could help. New problem keeps coming... unfortunately.

 

Table 1

Date  (1 Jan 2018, 1 Feb 2018...) - monthly basis

Branch (Tokyo, Osaka...)

Daily forecast for each month(2 per day for Jan, 3 per day for Feb)

 

To match with other data sets, I want to make Table 1 to daily basis....

 

New Table 2 I want to create

Date  (1 Jan 2018, 2 Jan 2018, 3 Jan 2018.... 1 Feb 2018..) - daily basis

Branch(Tokyo, Osaka...)

Daily forecast (2,2,2.. till end of Jan, 3,3,3... till end of Feb)

 

I created Calender table to make monthly Table 1 into daily Table 2 but for some reasons... ended up duplications.

 

Calender table has

Date (1 Jan 2018, 2 Jan 2018, 3 Jan 2018........)

Date 1 (1 Jan 2018, 1 Jan 2018, 1 Jan 2018.......)

 

I thought I could use Calender's table Date 1 to create relationship with Table 1's Date but did not work...

 

Hope this makese sense and appreciate your help!

 

All the best,

coco

 

 

Hi @cocomy,

If you have another new issue, please create a new thread. There is only one problem in one thread. Thanks for understanding.

Best Regards,
Angelia

OK! Thank you for letting me know.

Hi @cocomy

You're welcome, it's my pleasure to help you. Could you please mark the right reply for original issue as answer, so more people will get helpful information from here. 

Thanks,

Angelia

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.