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

Yearly Targets in Line chart Year week dimension

Hi Team,

I have Yearly Targets in the input file. I am showing one kpi in line chart which has YearWeek as dimension, there i need to show Target line also. I have connected Target excel file to Fact table through Brand&Year key.

Actually Target for

2020 : 5

2021 : 16

@202053 week is combination dates of 2020 and 2021 ( this as per requirement ).

I am facing problem for 202053 (yearweek) is merging 2020 & 2021 Target. It should show only 2020 Target.

please find the attached data model , Association and Chart.

 

WhatsApp Image 2021-01-28 at 11.45.21 AM.jpegWhatsApp Image 2021-01-28 at 10.42.43 AM (1).jpegWhatsApp Image 2021-01-28 at 10.42.43 AM.jpeg

 

Labels (2)
1 Reply
edwin
Master II
Master II

ill hazard a guess that you used week(DATE,0,0) to create your link field you used year(date) 
expectedly, week 53 for 2020/2021 will have two YEARS, instead of getting year of date i suggest getting year of the weekstart (which is 12/28/2020) in your example:

year(weekstart(DATEFIELD,0,0))


the 0,0 forces it to use Monday as start of week which is apparently what you are using

edwin_0-1611847989046.png