Skip to main content
Solved

How to show the current year in a chart title? (Views)

  • Feb 24, 2026 10:44 AM UTC
  • 2 replies
  • 413 views

florian.mrkvi
Level 7
Forum|alt.badge.img+3

Hi guys!

I feel kind of stupid to ask this kind of question but I can’t find a way to show the current year (currenly “2026”) in a chart title or column header.

In the studio it was easy:
I created a variable as “static value” type and used the
PQL “YEAR(TODAY())”.
In my chart I added the result with a syntax like
“Target Achievement (Year <%=current_year%>)”

 

Now in the views I can’t use PQL to populate a variable.
I can calculate the year in a KPI - but I can’t use that in a title or column header.

 

What am I missing??
I need this variable to be populated automatically, not hardcoded or assigned manually!

Thank you guys,
br Florian

Best answer by Sruti Ramesh

Hi, 

Can you please follow the steps listed in the doc - https://docs.celonis.com/en/creating-and-managing-enhanced-view-variables.html ? 

View original

2 replies

Forum|alt.badge.img+2
  • Level 10
  • Feb 25, 2026 12:54 AM UTC

try this : Target Achievement (Year ${new Date().getFullYear()} )

Reference:

Using smart inputs in Views

 


  • Celonaut
  • Answer
  • Feb 27, 2026 11:27 AM UTC

Hi, 

Can you please follow the steps listed in the doc - https://docs.celonis.com/en/creating-and-managing-enhanced-view-variables.html ?