Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Week number formatting.

hi all,

I have a data of 2013, 2014 and 2015. and i need to select the data of last 4 weeks and display in bar graph using Qlik sense.

PFA how data resembles in my db.

I used variables like below,

LET vMaxDate= '=max(date_created)';

LET vMaxWeek= '=max(week_number)';

LET vFirstOfLast7 = '=max(date_created,6)';

LET vFourWeeksAgo = '=max(week_number)-3';

The problem is the week number is till only 52. what i needed is, for 2013 it has to produce week_number till 52 and for 2014 it has to start from 53. same for 2015 it has to start from the week_number where 2014 ends,

To produce the week_number i am using the date_created column in table which has the dates in format  dd-mm-yyyy hh-mm-ss.

Anyone please help this to sort out  and to get the data of last 4 weeks.

Thanks,

Pramod

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Please post in the Qlik Sense forum.

Ralf-Narfeldt
Employee
Employee

If you want last 4 weeks data, don't use the week numbers in your calculation. Use dates instead in the calculation, the date four weeks ago is date_created-27.



Not applicable
Author

Yes I used it. If I use “date_created-27”, it shows data in daily basis. But I need that in week basis.

I think you understand the scenario.