Chose the newest date available

damen
damen Contributor

Hi All,

I am working to combine two tables. The first step I need to take is to filter the project_number by with the newest report date available.

The example below shows two different project numbers

The first one has the last report date as Q3 2022 - we need to capture that input

The second project_number has q4 of 2022 - we need to capture that input as well.

Essentially, I need to capture the latest known input for each project id.

Can someone help me with the logic on this one?

I'm not sure which functions would be the most efficient for this process. Any suggestions?

If this helps, feel free to agree, accept or awesome it!

Tagged:

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    You can use a Rank & Window tile with a MAX aggregation to get the most recent date. You can partition by the project_number to get the latest date for each project.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    You can use a Rank & Window tile with a MAX aggregation to get the most recent date. You can partition by the project_number to get the latest date for each project.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • damen
    damen Contributor

    @GrantSmith Awesome - Thanks!

    If this helps, feel free to agree, accept or awesome it!