Forum Discussion

VedranR's avatar
VedranR
Frequent Visitor
5 years ago

How to get value from other table based on last date

Hi,

 

If someone can help my, I am complete new in PBI.

 

This is situation. I have two tables:

 

Table 1

ID    Date         Value

1     01.01.2021      1

1     10.02.2021      3

2     11.01.2021      1

2     17.02.2021      3

5     15.01.2021      7

5     07.02.2021      2

 

Table 2

ID   Last_Date    Last_Value

1     10.02.2021      ?

2     17.02.2021      ?

3

5     07.02.2021      ?

 

 

How I can get Last_Value in Table 2 from Table 1?

 

Tnx in advance πŸ™‚

 

2 Replies

    • VedranR's avatar
      VedranR
      Frequent Visitor

      Sorry, your first solution ignore date and give me first value after maximum value, so that is not last value by date that I needed. Second isn`t work. But thanks for trying πŸ™‚