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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
krzys
Contributor II
Contributor II

WeeksAgo on the same Axis but for different quarter

Hi,

I am looking for a smart way to put WeeksAgo on the same axis but referring to a different point of time.

For example, the last date of Q1-22 was 3/31/2022, "1 week ago" to this date was 3/24/2022", etc.

The last date of Q2-22 was 6/30/2022, "1 week ago" to this date was 6/23/2022, etc.

I would like to compare "1 week" ago, on 1 axis for 3/24/2022 (Q1), 6/23/2022 (Q2), 9/23/2022 (Q3). and so on.

 

 I have all the data on one chart but the refer to their own "end of quarter date". I tired to introduce a new dimension to which would be a connecting point of time for different data points but I am not sure how to make it all work.

Sample added.

 

Thank you in advance! 🙂

krzys_0-1667833350628.png

 

Labels (5)
2 Replies
QFabian
MVP
MVP

hI @krzys , please try this, its about add a new field with the one week before, or seven days.

 

Data:
Load * INLINE [
Date, Value, Weeks ago
03/31/2022, 480, 0
03/24/2022, 490, 1
03/17/2022, 500, 2
03/10/2022, 600, 3
03/03/2022, 700, 4
02/24/2022, 800, 5
02/17/2022, 860, 6
02/10/2022, 900, 7
02/03/2022, 1000, 8
06/30/2022, 711, 0
06/23/2022, 723.5, 1
06/16/2022, 736, 2
06/09/2022, 861, 3
06/02/2022, 986, 4
05/26/2022, 1111, 5
05/19/2022, 1186, 6
05/12/2022, 1236, 7
05/05/2022, 1361, 8

];

left join
Load
Date+7 as Date,
Value as ValueOneWeekAgo
Resident Data;

 

And in chart, one dimension and two expressions.

 

QFabian_0-1667933227660.png

 

QFabian
krzys
Contributor II
Contributor II
Author

Thanks @QFabian for the idea. Unfortunately it will not work in my example. The sample is small but I have much more data and I need to have a possibility to analyse it. However, you gave me an idea :). I will try it today.