Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Range Compared to Previous Date Range

Hi everyone,

I am using the vStartDate, vEndDate variables method to create a date range and calculate Sum for a selected period. However, I need to compare a selected period to its corresponding prior period.


For example, selecting one day (2014-04-02) should be compared to the day before (2014-04-01), while selecting a range from 2014-04-04 to 2014-04-06 should be compared to the period from 2014-04-01 to 2014-04-03.


Any ideas?


Kind regards,

Ivelin

1 Solution

Accepted Solutions
daveamz
Partner - Creator III
Partner - Creator III

Hello Ivelin,

See my attachment.

I used another 2 variables calculated based on vStartDate and vEndDate.

The thing is that if you'll use Date as dimension you will have in one column 0 values like:

Date2014-04-02 - 2014-04-022014-04-01 - 2014-04-01
2014-04-01012
2014-04-02130

Regards,
David

View solution in original post

2 Replies
daveamz
Partner - Creator III
Partner - Creator III

Hello Ivelin,

See my attachment.

I used another 2 variables calculated based on vStartDate and vEndDate.

The thing is that if you'll use Date as dimension you will have in one column 0 values like:

Date2014-04-02 - 2014-04-022014-04-01 - 2014-04-01
2014-04-01012
2014-04-02130

Regards,
David

Not applicable
Author

Hi David,

works great, exactly the kind of solution I was looking for!

Thank you,

Ivelin