Skip to main content

I'm trying to select a dimension "Country" based on the most recent "Year" so I can use it as text and have it be dynamic. I don't want to use a filter as I don't want other values affected in the sheet.

 

In SQL it would be:

 

SELECT Country

FROM Table

ORDER BY Year DESC

LIMIT 1;

 

How would I go about implementing this as a Calculated Field?

 

Selecting A Value Based On Recent Year

4 answers
  1. Jul 13, 2018, 6:06 AM

    Hi, Hernan

     

    Thanks for the feedback. please find my updated calculation below

     

    if {Fixed :max([Year])} = [Year] then

         [Country]

    end

     

    Use this calculation as country

     

    Hope this helps

     

    ZZ

0/9000