Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Prior Week ,Prior month,Prior 3 Month,Prior 12 Month


Hi,

I was trying to get the data for previous week and previous months ,below are the conditions what I want to achieve.

 

1)Prior Wk--Always should be sum of previous week data(example:present week is 31st so we need  to do sum of 30th week data)
2)Prior Month-Always should be sum of 4 previous weeks data (means sum of 27th week to 30th data)
3)Prior 3 Month-Always should be sum of 12 previous weeks data (means sum of 19th week to 30th data)
4)Prior 12 Month-Always should be sum of previous 12 months data(means sum of last year from 34th week to present year 30th week data)

based on FISCAL_YEAR_WEEK_NUM field we need to get the Week Numbers.

thanks in advance

2 Replies
whiteline
Master II
Master II

Hi.

You can use set analysis for periods.

Calculating rolling n-period totals, averages or other aggregations

And WeekNum function to calculate # of week.

Not applicable
Author

Looks I have issue in data model..Can any one suggest me where went wrong.

Thanks

SwathiRaj