Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

Get day number from week

Hi I’m struggling getting the number of the day from a week. In a Expression

Example 16/01/2013 is Wednesday that is a 3; a Monday would be a 1 and so on.

Thanks in advance

Tags (3)
16 Replies
danielrozental
Honored Contributor II

Re: Get day number from week

Try weekday(Datefield)

martin59
Valued Contributor II

Re: Get day number from week

Hi,

In your load script, use the WeekDay() function.

For example,

LOAD Field1,

     Field2,

     ...,

     DateField,

     Year(DateField) as Year,

     Week(DateField) as Week,

     WeekDay(DateField) as WeekDay,

     Num(WeekDay(DateDield)) as NumWeekDay

FROM Data.qvd (qvd);

Hope that helps you

Martin Favier

Not applicable

Re: Get day number from week

Thanks it work well the only other thing that I have to do is modified the script file.

Not applicable

Re: Get day number from week

Thanks but is in a Expression

martin59
Valued Contributor II

Re: Get day number from week

Excuse me, but you do you means ?

Martin Favier

martin59
Valued Contributor II

Re: Get day number from week

Excuse me, but you do you means ?

Martin Favier

martin59
Valued Contributor II

Re: Get day number from week

Excuse me, but you do you means ?

Martin Favier

Not applicable

Re: Get day number from week

I use the script in an expression like

=if(weekday(today()) = Dia ,Name)

martin59
Valued Contributor II

Re: Get day number from week

What do you mean by "Dia" ?

Is your expression works ?

Martin Favier