Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

berryandcherry6
Not applicable

Sum Multiple data values into single Dimension

Hi,

i have a data where i have multiple data values for a single Date, If i use this data i get multiple values for same data.

But i need it to show Sum of data values to that particular Date.

My data is as below

  

DateCreatedSent
01-02-20172
01-02-20172
01-02-20173
02-02-20172
03-02-20177
04-02-20178
04-02-20179
04-02-201712
12-02-201756
01-02-201723
20-02-201756
19-02-20173
13-02-20172
17-02-20178
18-02-20170
19-02-2017

5

 

But i need to script to produce like this  

DateCreated      Sent
01-02-201730
02-02-20172
03-02-20177
04-02-201729
12-02-201756
13-02-20172
17-02-20178
18-02-20170
19-02-20178
20-02-201756

I am thinking this way, to display datas in LIne Chart. So that it shows one value to respective date

My Load Script

LOAD Sent,

date(floor(date_created),'MM-DD-YYYY') as DateCreated;

SQL SELECT Sent,

date_created

FROM EMAILMETRICS;

Tags (4)
6 Replies
loveisfail
Not applicable

Re: Sum Multiple data values into single Dimension

Is this?

Capture.PNG

Life is so rich, and we need to respect to the life !!!
berryandcherry6
Not applicable

Re: Sum Multiple data values into single Dimension

Hi Anil,

Thanks for reply!. Yes, it is as in shown graph. I am using Qliksense. can you post script or txt file in here.

loveisfail
Not applicable

Re: Sum Multiple data values into single Dimension

Even Qliksense it working

I am not sure, Which script you are expecting from my end ?

Capture.PNG

Life is so rich, and we need to respect to the life !!!
berryandcherry6
Not applicable

Re: Sum Multiple data values into single Dimension

Can you please look into this attached sample. Here i am combining two different tables date to display data for last 6 Months. But it shows me repeated date.

loveisfail
Not applicable

Re: Sum Multiple data values into single Dimension

May be use Join

Source:

LOAD UserTypeTotalView,

Date(Date#(DateTotalView,'YYYYMMDD'),'MM-DD-YYYY') as  DateLink,

    HitsTotalView,

     Year(DateTotalView) AS TrafficYear,

    num(Month(DateTotalView), '00') As TrafficMonth_Num ;

SQL SELECT UserTypeTotalView,

    DateTotalView,

    HitsTotalView

FROM TotalViewTrafficTable;

Join(Source)

LOAD delivered,

campaign_metrics_id ,

sent,

bounced,

opened,

email_type_id as email_metric_type_id,

  date(floor(date_created),'MM-DD-YYYY') as DateLink,

date(floor(date_created),'MM-DD-YYYY') as emaildatecreated ;

SQL SELECT delivered,

sent,

campaign_metrics_id,

bounced,

opened,

email_type_id,

date_created

FROM EMAILMETRICS;

Life is so rich, and we need to respect to the life !!!
berryandcherry6
Not applicable

Re: Sum Multiple data values into single Dimension

No this is showing multiple data for same date