Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have been provided with an inline table in which every new week starts from Monday and the corresponding date,
I have been told to make the week start from Friday instead of Monday.
I am attaching a qvw file for your reference any help is greatly appreciated i am a new to qlikview and learning slowly
Expecting like this?
weekdaytable:
LOAD *,
if(IsNull(Previous(Date)), 1, if(WeekStart(Previous(Date), 0, 4) = WeekStart(Date, 0, 4), Peek('WeekNo'), Peek('WeekNo') + 1)) AS WeekNo;
Load
day(Date) as Day,
Date,
WeekDay(Date) as weekday,
RowNo() as count
Resident Input;
Expecting like this?
weekdaytable:
LOAD *,
if(IsNull(Previous(Date)), 1, if(WeekStart(Previous(Date), 0, 4) = WeekStart(Date, 0, 4), Peek('WeekNo'), Peek('WeekNo') + 1)) AS WeekNo;
Load
day(Date) as Day,
Date,
WeekDay(Date) as weekday,
RowNo() as count
Resident Input;
Hello,
Find attachment its working.
Hope it help you
Find field NewWeekStartDate
Hi Nadeem,
You do this within the script of your Master Calendar
Dual(WeekDay(Field),Mod(WeekDay(Field)+3,7))
Actally i dont have master calendar i am told to do this just with the inline table
Thanks for the Input
Thanks a lot u nailed it perfectly ... If you could explain me the IF statement that you have used and also why you have not included the from statement in your first load statement
"LOAD *,
if(IsNull(Previous(Date)), 1, if(WeekStart(Previous(Date), 0, 4) = WeekStart(Date, 0, 4), Peek('WeekNo'), Peek('WeekNo') + 1)) AS WeekNo;"
i would greatly appreciate it..
Thanks & regards,
Nadeem