Skip to main content
Announcements
The New Qlik Learning Experience is Here! GET STARTED
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Week number showing wrong

Hi,

We have used the below logic to define week ,but it is not showing correct like if we select 2016 May 1st means it should show 1st week of the month but it showing 2nd week as below

Logic Used : if(month(weekend(new_order_date,0,6))= month(new_order_date),div(day(WeekEnd(new_order_date,0,6)),7),div(day(Weekend(new_order_date,-1,6)),7)) as WeekNumber

Current o/p:

Untitled.png

Thanks..

2 Replies
ramasaisaksoft

Hi Naresh,

we are unable to see your data(Field data which you have in Scripts new_order_date) so please show sample data for that .and check if u select any other month 1st day how is the behavior of that week filter?

nareshthavidishetty
Creator III
Creator III
Author

Thanks for response..

We have resolve the issue using ' 'W'&Ceil(Day(Date)/7) as  MonthlyWeek'

Thanks..