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

Combining Data and Dates from two different tables

Hi,

I am looking to combine values and dates that are in two seperate tables.

 

In the first table, the rows contains time series data (fi data) for different companies (identifier in first column).  The second table is structured the same (identifiers in first column), except the cells contains dates that correspond to the data in the first table. 

 

Is there a way to combine these data so that I end up with a single table that has 3 colums as follows: 

 

Column 1: company identifier

Column 2: date

Column 3: Fi data

 

Thanks!

 

Jonathan

3 ACCEPTED SOLUTIONS

you might try,

 

in query editor to un-pivot both tables

 

then merge tables

 

in a database one can't do that but here in Power BI the simple ordering of the rows may allow that to work

www.CahabaData.com

View solution in original post

Assuming that your tables' layout will always match at a cell level (as you show it in your dummy data), I would unpivot both tables, add an index column, then merge on the index column.  This should get all the values for each date in the appropriate rows.

View solution in original post

@jdata  assuming your data does match as @dkay84_PowerBI says

all you really need is the Index in each table - duh! Smiley Wink

 

Query Editor - Unpivot, Index and Merge.gif

View solution in original post

11 REPLIES 11

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.