Forum Discussion

allejot's avatar
allejot
Frequent Visitor
3 years ago
Solved

Min and Max Date between two tables

Hi guys,    I am pretty new to DAX and I need a little help in solving an issue. Here my situation:   2 tables: - PROJECT: project ID - LEDGER LINES: posting date, project id   Desired outcom...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  allejot,

    As per your question I have created the below table.

     

     

    1. Create a new column as 

    Earliest date = CALCULATE(Min('LEDGER LINES'[posting date]),FILTER('LEDGER LINES','LEDGER LINES'[Project Id]=project[Project id]))
    2. Create a new column as 
    Latest date = CALCULATE(MAX('LEDGER LINES'[posting date]),FILTER('LEDGER LINES','LEDGER LINES'[Project Id]=project[Project id]))
     
    Results:

     

     

    Best Regards,
    Shreya

    Appreciate with a Kudos!! (Click the Thumbs Up Button)
    Did I answer your question? Mark my post as a solution!