Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Weekday calc

Hi Guys,

I am looking to create a flag in my script that identifies when the date field is equal to "Yesterday"

This is working fine except when its a Monday as Yesterday is then Sunday , ( I wish to identify Friday then !!)

I need to amend the script to a weekday function , but have tried a few different things and cant quite get it , can anyone help

This is formula as it is now :

If(Period_dte = Today() - 1, 'Yes',null()) as YesterdayWH,

Can anyone help ?

Thanks


A

1 Solution

Accepted Solutions
jason_michaelid
Honored Contributor II

Re: Weekday calc

Hi,

Try the attached.

Hope this helps,

Jason

2 Replies
jason_michaelid
Honored Contributor II

Re: Weekday calc

Hi,

Try the attached.

Hope this helps,

Jason

Not applicable

Re: Weekday calc

Thanks Jason

I had come up with a similar way see attached formula ( as I wanted to create an expression with a null value!!)

Kind regards

A

if(Period_dte=if(weekday(today()-1) * 1 <5,today()-1,today()-3),'Yes',null()) as YesterdayWH,