Forum Discussion

AbsoluteNovice's avatar
AbsoluteNovice
New Member
2 years ago
Solved

Comparing Dates in Multiple Tables

Hi,

I'm pretty new to Power BI and am completely stumped on this one. I have data in three different tables and I need to find the most recent Meter Reading Date (Table 2) or Overhaul date (Table 3), which ever is greater, for each Asset (Table 1). 

 

Each asset has a unique identified (serial number) but can have multiple Meter Readings and Overhaul dates. 

 

Each table has a lot of other columns I haven't included for simplicity but these the key ones.

 

Table 1 - Assets: 

Serial Number               Asset Status            Asset Location
1234Operational Storeroom 1
1235Operational Storeroom 2
1236Operational Storeroom 3
1237Operational Storeroom 3

 

Table 2 - Meter Readings

Serial Number           Date of Last Reading                     
12341/01/2024
12351/02/2024
12361/03/2024
12371/04/2024
12341/01/2022
12351/02/2022
12361/03/2022
12371/04/2022
12341/01/2020
12351/02/2020
12361/03/2020
12371/04/2020

 

Table 3 - Overhauls:

Serial NumberDate of Last Reading
12341/04/2024
12351/03/2024
12361/02/2024
12371/01/2024
12341/04/2020
12351/03/2020
12361/02/2020
12371/01/2020

 

Thanks!

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Your solutions is so great ryan_mayu 

    Hi, AbsoluteNovice 

    Have you solved the current problem? If yes, you can share your solution here or mark the help that is useful to you as a solution so that other members of the community can quickly find the answer when they encounter similar problems. Thank you again.

     

     

    Best Regards

    Jianpeng Li