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

How to merge three tables?

Hi

I have three tables called Contact, Opportunity and Website

 

Contact:

 

Sean500_0-1684625366661.png

 

Opportunity:

 

Sean500_1-1684625397373.png

 

Website:

Sean500_2-1684625734110.png

 

Website table has data as a daily basis (date), and Opportunity & Contact has data as Month-Year wise. 

 

I wanted to merge all these three tables and wanted below output and select Campign from the Website table as a filter.

 

Month -YearClicks CostCTRSessionOrganic SrachesGross PriceNightsProjected weeksOpportunityProjected SalesROIWeeks Needed
Mar-224£91202345£00045340.22
April 20220£374034100£000453223
May-2226£87023323£35-1604243323
Jun-2256£3,18015445£71404212

 

-- Clicks, Cost, CTR, Session, Organic Searches from Website table
-- Gross Price, Nights from Contact table
-- Projected Weeks and Opportunity from Opportunity table
--

Projected Sales = (SUM(Oppotunity[Projected Number of Weeks]) + SUM(Contact[Nights]))/2
ROI = Gross Price/Cost
Weeks needed = (Cost x £9)-Gross Price)/1247

 

Please note the above output values are dummy

 

I tried to merge in Power Query all these table but no success. Can anyone advise how to do this?

 

 

 

 

 

1 ACCEPTED SOLUTION
bhelou
Responsive Resident
Responsive Resident

Dear , 

All you need is a date table and from it you can link all the tables together , in dates table , generate end of month and year also , 

attached Power BI , 

bhelou_0-1684650558778.png

 

 

bhelou_1-1684650585202.png

 


https://www.dropbox.com/s/tj1e3et3quhtjqb/test%20dashboard.pbix?dl=0 

View solution in original post

2 REPLIES 2
bhelou
Responsive Resident
Responsive Resident

Dear , 

All you need is a date table and from it you can link all the tables together , in dates table , generate end of month and year also , 

attached Power BI , 

bhelou_0-1684650558778.png

 

 

bhelou_1-1684650585202.png

 


https://www.dropbox.com/s/tj1e3et3quhtjqb/test%20dashboard.pbix?dl=0 

RocketRod
Frequent Visitor

For starters, in your Website table add a new column that derives the start of the month from your Date column. Refer to get start of month https://learn.microsoft.com/en-us/powerquery-m/date-startofmonth.

 

Use the new column to merge the other tables. Once all data us merge you may want to consider doing some of your calculations in Power Query. 

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.