Magic ETL

Magic ETL

Chose the newest date available

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?

image.png

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

  • 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

  • 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!**
  • Contributor

    @GrantSmith Awesome - Thanks!

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

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In