Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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
MVP
MVP

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
MVP
MVP

May be this

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

sunny_talwar
MVP
MVP

Or this

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