Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
kvr9
Contributor

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
Arjunarao
Honored Contributor II

Re: How to create Weekly data in table

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

kvr9
Contributor

Re: How to create Weekly data in table

Thank you for your response.

Could you tell me how to store previous week data also

Arjunarao
Honored Contributor II

Re: How to create Weekly data in table

Can you attach some sample data?

Arjunarao
Honored Contributor II

Re: How to create Weekly data in table

Try this. You can see Week also.

Master Calendar Data

kvr9
Contributor

Re: How to create Weekly data in table

Hi Arjun,

PFA of sample data.

Arjunarao
Honored Contributor II

Re: How to create Weekly data in table

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
Contributor

Re: How to create Weekly data in table

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.