How can I create a DAX (calculated field) to perform a lookup from table 1 to table 2 in Power pivot as below?
- Customer Table (Dimension)
| Customer Key | FirstPurchaseDate |
|---|---|
| 10000 | 9/7/2018 |
| 10001 | 28/7/2018 |
| 10002 | 9/9/2021 |
- Sales Table (Fact)
| Customer Key | Order Date | FirstPurchaseDate |
|---|---|---|
| 10000 | 9/7/2019 | |
| 10000 | 28/7/2019 | |
| 10001 | 9/10/2019 | |
| 10003 | 9/10/2019 |
Both tables have customer key as primary key with 1-many relationship. I've try related, relatedtable and lookupvalue but fail.
Thanks a lot for your help !!
