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
Anonymous
Not applicable

Adding columns from different tables based on date

I have two tables, one contains a price column, and one contains a volume column. I'd like to create a new table with both price and column. There is a date column in each of the original tables that I'd like to be the relationship between the price and column. So in the end I want a table with Date, Price, and Volume. How can I do this? 

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can take try of “Merge” option in query edit.

Click “Merge Queries as New” to generate a new table under the condition of date matching:

1.png2.png3.png

 

Alternatively, you can using DAX :

Price = LOOKUPVALUE(Table1[Price],Table1[Date],Table2[Date])

4.png

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

So to be more specific, I'm in DAX and I've typed out a lot of summarized columns for a few different things, and I'm having trouble just simply adding a single column of values that correlate with the date. I was keeping it simple for explantions sake earlier, but now I can't seem to figure out how to add on that last column. Merge queries isn't an option at this point with the way the new table is set up. I think the Add Column tool will be the solution but I don't know how to get the prices to go right alongside everything else

Hi @Anonymous ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.