Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ameensom
New Contributor II

How can I show Week over Week analysis for two years

Hi

I have a WoW analysis of the number of requests

My dimension is:

createdAt_u0.autoCalendar.Week

My measure is

Request # count

The chart looks okay in 2017, but in 2018 I have a problem as the chart looks like this:

eg,number of requests.jpg

What do I want?

I want the two weeks of 2018 to be at the end of the chart not at the first



If someone can help, I'll appreciate that

Tags (2)
6 Replies
MVP
MVP

Re: How can I show Week over Week analysis for two years

For a dimension you will have to use a combination of year and month which would be the field:

createdAt_u0.autoCalendar.YearWeek



ameensom
New Contributor II

Re: How can I show Week over Week analysis for two years

Hi Petter and thanks for the response

Unfortunately, I don't have that dimension yet, can you help me out on how to create it in the script?

I tried this but it didn't work out

Untitled.png

devarasu07
Honored Contributor II

Re: How can I show Week over Week analysis for two years

Hi,

you can try to add like below,

Week(weekstart(CalDate)) & '-' & WeekYear(CalDate) as WeekYear,

after adding this field try to add in your chart - sort table expression WeekYear as ascending order and u can get the desired result

Note: remember to update your Date field instead of CalDate.

Thanks

Deva

ameensom
New Contributor II

Re: How can I show Week over Week analysis for two years

It worked and gave me the results but it shows weeks from right to left

Is there any way I can make the weeks from left to right?

Thanks a lot!

devarasu07
Honored Contributor II

Re: How can I show Week over Week analysis for two years

Hi,

so just want the latest WeekYear to be in the left side and history week display in right side right? then u try to change the Sort order as descending

Capture.JPG

MVP
MVP

Re: How can I show Week over Week analysis for two years

WeekYear($1)&Num(Week($1),'00')

Give you the right order in an autocalender if you have

Set BrokenWeeks=0;

Community Browser