Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Specialist
Specialist

Show data for last 2 years in pivot by week qliksense

Hi All,

I have below table :-

Aspiring_Developer_0-1653993397176.png

Dimensin - LOB | New_year_Trend| Week

Measure - sum({<LOGGED_DATE_New=,test=,ISSUE_CLOSED_DATE=, Date_key=,Year_NEW_Trend={$(=Max(Year_NEW_Trend)),$(=Max(Year_NEW_Trend)-1)}>} TREND_VOL)

I am showcasing weekly data for last 2 years using set analysis. However, in the backend I have data commencing frpom 2020  till 2021 and the dimension Year_new_Trend in the above table is used as a filter. I wish to show this year filter with only 2 years of values i/e 2021 and 2022 . Right now It is showing like this :-

Aspiring_Developer_1-1653993612665.png

 

Also this year field is coming from master calendar

Aspiring_Developer_2-1653993659718.png

 

How can I achieve it ? 

Thanks in advance

Labels (1)
1 Reply
brunobertels
Master
Master

Hi 

may be this :

if(Year_NEW_Trend>year(today())-2,Year_NEW_Trend)