Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dates grouped data columns

Please help me,

I need to change the date row data column must be grouped code values for months,

Example: I have the following table on the server

data:
LOAD *;
SQL
SELECT DATE,ITEM,QUANTITY
FROM PDDTAEPM.DATA
 
STORE data INTO datasum.qvd(qvd);

DROP table data;

 

I have something like:

DateÍtemQuantity
01-jan-201512310
10-jan-201512315
15-jan-20151005
25-jan-201510020
30-jan-201520010
02-feb-201512330
10-feb-201520015
18-feb-201520010
24-feb-20152005
27-feb-201510010

but I need this

ÍtemEneroFebrero
1002510
1232530
2001030

Thank you very much


1 Solution

Accepted Solutions
sunny_talwar

Looking to get this???

Capture.PNG

Script:

Table:

LOAD *,

  Month(Date) as Month,

  MonthName(Date)as MonthYear;

LOAD Date#(Capitalize(Date), 'DD-MMM-YYYY') as Date,

    Ítem,

    Quantity

FROM

[https://community.qlik.com/thread/175280]

(html, codepage is 1252, embedded labels, table is @1);

Create a Pivot Table with Item and MonthYear as Dimension and Sum(Quantity) as expression.

HTH

Best,

Sunny

View solution in original post

2 Replies
sunny_talwar

Looking to get this???

Capture.PNG

Script:

Table:

LOAD *,

  Month(Date) as Month,

  MonthName(Date)as MonthYear;

LOAD Date#(Capitalize(Date), 'DD-MMM-YYYY') as Date,

    Ítem,

    Quantity

FROM

[https://community.qlik.com/thread/175280]

(html, codepage is 1252, embedded labels, table is @1);

Create a Pivot Table with Item and MonthYear as Dimension and Sum(Quantity) as expression.

HTH

Best,

Sunny

Not applicable
Author

Again thank you very much,

I already have as well as the months I mean, how do I add January and February, February and March, March and April and so on. I need to add two and two and leave the results in a column. Because then I get the standard deviation of the months grouped in pairs.

Please help me as I do this?

I need this?

          

ìtemMonthyearjan-15feb-15mar-15apr-15sum(jan+feb)sum(feb+mar)sum(mar+apr)standard deviation
100 251010535201510,41
123 2530201055503013,23
200 103030540603513,23

Thanks