Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

berryandcherry6
Contributor II

display data for weekly based on date in qliksense

Hi,

i have a data like shown below, it contains all dates from when application started to till date and its respective datas.

Now i need to put a line graph with Dimension - Date(Monday to Sunday), UserType .   Measure - Pageviews. But data display should be weekly from Monday to Sunday.

i.e for example : 05/12/2016 - 11/12/2016 ,for New visitor it should display sum of Pageviews and for Returning Visitor it should display sum of Pageviews.

 

         DateUserType        Pageviews
16-12-2015New Visitor77
16-12-2015Returning Visitor36
17-12-2015New Visitor72
17-12-2015Returning Visitor16
18-12-2015New Visitor82
18-12-2015Returning Visitor11
19-12-2015New Visitor113
19-12-2015Returning Visitor39
20-12-2015New Visitor19
20-12-2015Returning Visitor16
21-12-2015New Visitor41
21-12-2015Returning Visitor27
22-12-2015New Visitor60

Any kind of help is appreciated on this

Regards,

Supriya

1 Solution

Accepted Solutions

Re: display data for weekly based on date in qliksense

Create a week field in the script and use that as dimension:

LOAD

     Date,

     Dual(Date(WeekStart(Date),'DD/MM/YYYY') & '-'

          & Date(WeekEnd(Date),'DD/MM/YYYY'), WeekStart(Date)) as Week,

     UserType,

     Pageviews

FROM

     ....source data...

     ;


talk is cheap, supply exceeds demand
1 Reply

Re: display data for weekly based on date in qliksense

Create a week field in the script and use that as dimension:

LOAD

     Date,

     Dual(Date(WeekStart(Date),'DD/MM/YYYY') & '-'

          & Date(WeekEnd(Date),'DD/MM/YYYY'), WeekStart(Date)) as Week,

     UserType,

     Pageviews

FROM

     ....source data...

     ;


talk is cheap, supply exceeds demand
Community Browser