Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
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
aarkay29
Specialist
Specialist

try this may be

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

then it will correctly evaluate the max values


vishsaggi
Champion III
Champion III

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

Anonymous
Not applicable

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

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