Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Not applicable

Week comparison

Hey guys,

how could I make a week comparison in a line / bar chart by selecting two or more specific weeks?

Many thanks

2 Replies

Re: Week comparison


without using set analysis you can make week comparisons, for example per year. All you have to do is selecting week and year as dimensions. This can give you an easy way to compare weeks that will be displayed depending on your selection.

The problem with this approach is that if for example you need to see week for current month compared to weeks for past month it would not be possible if your selection is July 2014, because your selection will be narrowed to just weeks that belong to current month (july).

For cases like that, you need to use set analysis and fix some selection or ranges of data like this:


This sample expression will return you the sales for current week and week-1, week-2 and week-3. It is important to ignore some field selections that could affect your result (for example here I ignore Year, Month and Date, supposing that those filters are available to users and that they can potentially affect my calculation). Another example would be to have separate columns for every week so I can see the comparison of the last 4 weeks,



Re: Week comparison

Another option would be to create a week number field in your script using

Year(MyDate) & Week(MyDate) as MyWeekNumber

And then use that as your dimension.