Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

Need help on previous Week's WTD set analysis on current year

Hi,

I am using the below set analysis for WTD calculation:

sum({$<[Process Date]={">=$(=WeekStart(Max([Process Date]))) <=$(=Max([Process Date]))"}>}[Sales Posting Amount USD])

But now I have to calculate Previous Week's(But not previous Year's WTD, so if it 4th week of year, I need 3rd weeks WTD) WTD and please give me the set analysis for that.

Thanks,

Sandip

4 Replies
sunny_talwar

May be this

Sum({$<[Process Date]={">=$(=WeekStart(Max([Process Date]), -1)) <=$(=Date(Max([Process Date])-7))"}>}[Sales Posting Amount USD])

antoniotiman
Master III
Master III

Hi,

may be

WeekStart(Max(Date),-1)

WeekEnd(Max(Date),-1)

Regards,

Antonio

ziadm
Specialist
Specialist

Hi

Create a Calendar and use set Analysis to define all metrics based on the calendar filter. 

if you are in the middle of the week and you want to compare with previous week then you have to compare number of days passed in the current week with same number of days of last week in order to have an equal comparative.

Compare Current Period with Previous Period Mistake

VishalSingh18
Contributor III
Contributor III

Thanks @sunny_talwar your formula helped for me

I really appreciate it boss i was trying such calculations from yesterday 11 am 

thanks thank u it helped