cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

How to match the value of one table using the date to another table with Start Date and End Date

I have these two datasets e.g. 

Table 1

Start Date  End Date  Value
01/01/21  07/01/21  1
08/01/21  14/01/21  2
15/01/21  21/01/21  3
22/01/21  28/01/21  4


Table 2

Date

03/01/21

12/01/21
16/01/21
22/01/21
07/01/21

 

How would I add the Value column from Table 1 to Table 2? I've tried using Filter, Lookupvalue, Calculate, but cannot figure it out

Any suggestion would be much appreciated

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

new column in table 2

maxx(filter(Table1, Table2[Date] >= Table1[Start date] && Table2[Date] <= Table1[End Date]) , Table1[Value])

 

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous ,

new column in table 2

maxx(filter(Table1, Table2[Date] >= Table1[Start date] && Table2[Date] <= Table1[End Date]) , Table1[Value])

 

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors