Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dax Help - Grab by Rows by Latest Dates

Hi all,

 

I need some help. I was wondering if someone can help with a dax formula that selects only the ETL_ID's with the latest updated information (i bolded the rows as an example of the ones i want it to grab).. Thank you in advance.

 

"Client" Table.. 

 

ETL_ID ETL_UpdateAddress
1Jan. 1, 2022123 Fake St
2Jan 5, 2022456 Fake St
3Jan 2, 2022789 Fake St
1Dec 10, 2021   123 Old Fake St
3Jun 5, 2021789 Old Fake St
  • You could add a column 

    Is Latest =
    var maxDate = CALCULATE(MAX('Table'[ETL Update]), ALLEXCEPT( 'Table'[ETL_ID]))
    return IF( 'Table'[ETL_Update] = maxDate, 1, 0)

2 Replies

  • You could add a column 

    Is Latest =
    var maxDate = CALCULATE(MAX('Table'[ETL Update]), ALLEXCEPT( 'Table'[ETL_ID]))
    return IF( 'Table'[ETL_Update] = maxDate, 1, 0)
    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks for the help!