Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Week - Expression

Dear ALL

Here is my case and I hope that you can help:

my date filed name is a WeekName :

As this Form

WeekName

2017/19

2017/20

2017/21

2017/22

2017/23

2017/24

How can I extract to data as of Max(WeekName)-1 in this case when weekName < 2017/14 I used WeekName <= Max(WeekName)-1

it didn't work.

Thank you, 

3 Replies
Highlighted
Specialist
Specialist

Re: Week - Expression

try this may be

replace('2017/14','/','') as WeekName

then it will correctly evaluate the max values


Highlighted
Champion III
Champion III

Re: Week - Expression

Using Aar Kay expression you can use that inside your Max() function too, if you don't want in the script. However, script is more advisable.

<= Max(Replace(WeekName,'/','')) - 1

Highlighted
Anonymous
Not applicable

Re: Week - Expression

not sure you're using dual()s, try the following:

date(Addweeks(date#(YOURFIELD,'YYYY/WW'),-10),'YYYY/WW)