Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Alonal148
Contributor III
Contributor III

year formula dose not worke

Hi,

Need help to understand why the next formula dose not work:

={<[diffDate.autoCalendar.Year]={'2018'}>}

I would like to show only year 2018 in a table.

Thank you,

Alona

7 Replies
tresesco
MVP
MVP

Could you explain with more detail? What is the entire expression? Where are you using it? 

sunny_talwar

How is your derived calendar coding Year field? Is this the code that is getting used? -> Year($1) As Year Tagged ('$numeric') or is it doing something else?

Calendar:
DECLARE FIELD DEFINITION TAGGED '$date'
   Parameters
      first_month_of_year = 1
   Fields
      Year($1) As Year Tagged ('$numeric'),
      Month($1) as Month Tagged ('$numeric'),
      Date($1) as Date Tagged ('$date'),
      Week($1) as Week Tagged ('$numeric'),
      Weekday($1) as Weekday Tagged ('$numeric'),
      DayNumberOfYear($1, first_month_of_year) as DayNumberOfYear Tagged ('$numeric');

 

Alonal148
Contributor III
Contributor III
Author

Hi,

I tried to limit table to year 2018. 

And I want the dimansion "year" will apper in the rows.

Thank you

Alonal148
Contributor III
Contributor III
Author

Hi,

In the base table there is only 'Date'.

The 'Year' was created by Qlik automatic.

 

Alonal148
Contributor III
Contributor III
Author

Hi,

I sloved the problem.

The expresuin should be on tyhe measure:

Avg({$<[diffDate.autoCalendar.Year]={'2018'}>}([sales]))

Thank tou

sunny_talwar

Right, and how exactly is this Qlik automatic script look like?

Alonal148
Contributor III
Contributor III
Author

Thank you.

I sloved the problem