Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
adoteykwame
Creator
Creator

Last day to be Friday if Current day is awalys Monday

Hi,

Looking for a way to make the Last Day a Friday if current day is a Monday.

vCurrrentDay = DAY(MAX(iDate))

vPreviousDay = DAY(MAX(iDate)-1)

Thanks

3 Replies
Not applicable

hi,

Use this script

  vPreviousDay = if(WeekDAY(MAX(iDate))='Mon', Day(MAX(iDate)-3), Day(MAX(iDate)-1))

Reagrds,

Vivek

tresesco
MVP
MVP

Something like:

vPreviousday=If(WeekDay(Max(iDate))='Mon', Day(Max(iDate)-3), DAY(MAX(iDate)-1))

satyadev_j
Specialist
Specialist

Hi,

Try below,

vPreviousDay = Day(If(WeekDay(Max(iDate))='Mon', Max(iDate)-3, Max(iDate)-1);