Forum Discussion

NitinReja's avatar
NitinReja
Regular Visitor
4 years ago
Solved

Lookup from another table based on dates

Hi, 
I am trying to automate my invoicing calculation as excel is not able to support the data size. I am using power BI for automating the calculations.

So, problem as under -

I have orders in different dates and different date periods have a different price agreement (depends on sequence number as well - but that is not a big problem).

In excel, we would normally do a filter and assign a price valid on that date to the order rows. This is important as we need to give this backup to our clients for cross verification.

How do we do this in power BI -

 

 

  • NitinReja , You can create new column like the one below in Table 1

     

    MAxx(filter(Table2, Table1[Collection Date] >= Table2[Date Valid From] && Table1[Collection Date] <= Table2[Date Valid to]), Table2[Price 1St])

2 Replies

  • NitinReja , You can create new column like the one below in Table 1

     

    MAxx(filter(Table2, Table1[Collection Date] >= Table2[Date Valid From] && Table1[Collection Date] <= Table2[Date Valid to]), Table2[Price 1St])