Skip to main content
Question

Current year automated

  • June 4, 2026
  • 1 reply
  • 6 views

Hi,

I have a metric named current year with year as data type and no dimension. purpose is to automatically update the current year every year. Is this possible to achieve in pigment and how?

Thanks in advance

1 reply

CDALMAY
Master Helper
Forum|alt.badge.img+16
  • Master Helper
  • June 4, 2026

Hi ​@Nancy Mehrotra ,

Yes it’s possible. What you can do is the following :

  1. Have a metric Set_Current_Year with :
    • ​​​​​Data Type : Year
    • Dimension : None
  2. Second metric Set_Bool_Current_Year with :
    •  Data Type : Boolean
    • Dimension : Year
    • Formula : 
      IF(Set_Current_Year = Year,
      TRUE
      )
  3. In Variables you can do the following:
     

You will then be able to use those variable in tables/boards and in a single place change the Year to be displayed (refresh your page if it doesn’t refresh automatically).

Note : I usually do the same for Month and Quarter.
Note 2: If you want the year to be automatically populated on Set_Current_Year you can leverage the metric today (below is how to create it by ​@Stef) and use the formula 

TIMEDIM(today,Year)



Hope this helps,