Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kvr9
Creator
Creator

How to create Weekly data in table

Hi Experts,

Currently in my project we are using a flip option for Yearly/Quarterly/Monthly now I need to add weekly option to it.

So can Some one tell me how to give weekly data.

Also I have an another requirement, I need to capture weekly comparison i.e Previous week with current week my week starts from mon-fri.

So every friday i need to store the data as previous weeK(Static) and from monday it will be current week(Dynamic).

Thank you in advance.

7 Replies
qlikviewwizard
Master II
Master II

If you create Week column in Calendar you can make use of it.

kvr9
Creator
Creator
Author

Thank you for your response.

Could you tell me how to store previous week data also

qlikviewwizard
Master II
Master II

Can you attach some sample data?

qlikviewwizard
Master II
Master II

Try this. You can see Week also.

Master Calendar Data

kvr9
Creator
Creator
Author

Hi Arjun,

PFA of sample data.

qlikviewwizard
Master II
Master II

Hi,

Try like this.

Data:

LOAD *, WeekName(Date) as WeekName,'Q' &Ceil(month(Date)/3)&' '&Year(Date) as Quarter,Month(Date) as Month,Year(Date) as Year;

LOAD Country,

    Division,

    Date,

    Sales

FROM

[weekly comparsion.xlsx]

(ooxml, embedded labels, table is [Sales Data]);

Expressions:

Previous Week (including errors):

sum({<WeekName={"$(=WeekName(Max(WeekName)-1))"}>}Sales)

Current Week (including errors):

sum({<WeekName={"$(=WeekName(Max(WeekName)))"}>}Sales)

% Change:

(Column(1)-Column(2))/Column(1)

Capture.PNG

kvr9
Creator
Creator
Author

Hi Arjun,

Aplogies for delay in response.

It is working fine, but only issue is, it is comparing with exact previous week(Week -1) .

What if the data is loaded 2 weeks back and not loaded currently i.e we didn't loaded last week and current week also.

With current formula I can't get any information for such situation.

Kindly help me out.