Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Didi420
Contributor
Contributor

Week before last week values

I've got a table like this:

Date Percent Count
3/7/2022 82.49% 1,148
3/8/2022 82.59% 1,074
3/9/2022 83.21% 1,108
3/10/2022 80.56% 921
3/11/2022 80.86% 972
3/12/2022 85.43% 1,023
3/13/2022 82.81% 989
3/14/2022 84.71% 1,236
3/15/2022 84.16% 1,326
3/16/2022 83.66% 1,120
3/17/2022 82.37% 1,197
3/18/2022 82.68% 1,074
3/19/2022 87.75% 1,069
3/20/2022 87.41% 1,104

 

Using this article https://community.qlik.com/t5/New-to-Qlik-Sense/Last-7-Days-values/td-p/1519017 I've obtained last 7 days of the dataset. For comparisons I'd like to get 7 entries before that time period, e.g. previous week.

Last 7 days (most recent week) I calculated using:
=If(Date>$(MaxDayMinus7),Date(Date,'dd-MMM-YYYY')&chr(13)&Date,NULL())

and variable MaxDayMinus7:
=Max(Num(Date))-7

Can I fetch 7 entries before the last ones using similar approach?

 

Many thanks!

Labels (2)
1 Reply
MendyS
Partner - Creator III
Partner - Creator III

Hi @Didi420 

if I got you,
try to used with Peek() and Previous() functions

here you have more details - 
Peek() vs Previous() – When to Use Each - Qlik Community - 1475913