Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Expression

Calendar

Below is my calendar expression..

I am writing a query and

Dual(Year(Today()) & '/' & Week(Today()), WeekStart(Today())) AS Fiscal_Year_LastWeek 

from my calendar.qvd which gives me the result 2017/35

I want to show the previous week. How can I alter this. I've added -1 everywhere in the above expression.

I want to show the previous week 2017/34

1 Solution

Accepted Solutions
sunny_talwar

May be this

Dual(Year(Today()-7) & '/' & Week(Today()-7), WeekStart(Today(), -1)) AS Fiscal_Year_LastWeek

View solution in original post

3 Replies
Anil_Babu_Samineni

Perhaps this?

Dual(Year(Today()) & '/' & Week(Today())-1, WeekStart(Today())) AS Fiscal_Year_LastWeek

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

May be this

Dual(Year(Today()-7) & '/' & Week(Today()-7), WeekStart(Today(), -1)) AS Fiscal_Year_LastWeek

sunny_talwar

Or this

Dual(Year(Today()-7) & '/' & Week(Today()-7), WeekStart(Today()-7)) AS Fiscal_Year_LastWeek