Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sebastian_Dec
Creator II
Creator II

Group By Sales not working

Hi, I want to Group data by Sales, because I have 10'000'000 records and I can squeeze to just about 30,000.

My code dont working, what i do wrong?
Please help 🙂

els_mart_cenbaco_obroty_72_tmp:
LOAD hid_shop, 
date(hid_data) as Data,
hid_seg, 
sales_gros_total as sales_gros, 
sales_net_total as sales_net, 
marza_1_pamp_total as marza_1_pamp
From [lib://QlikContainers\Prod\Cenbaco\2.QVD\3.Load\cenbaco_obroty_72_2023.qvd]
(qvd)
Where
Month(hid_data) = '1'
;
 
NoConcatenate
els_mart_cenbaco_obroty_72:
Load
hid_shop, 
Data,
hid_seg, 
sum(sales_gros) as sales_gros, 
sum(sales_net) as sales_net, 
sum(marza_1_pamp) as marza_1_pamp
    Resident els_mart_cenbaco_obroty_72_tmp
    group by hid_sklep, Data, hid_seg, sales_gros, sales_net, marza_1_pamp
    ;
 
Drop Table els_mart_cenbaco_obroty_72_tmp;
 
STORE els_mart_cenbaco_obroty_72 INTO [lib://QlikContainers\Prod\Cenbaco\2.QVD\3.Load\ObrotyGropuBy.qvd]
(qvd);

 

Thanks & Regards,
Please close the thread by marking correct answer & give likes if you like the post.
Labels (4)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

Try thi s

els_mart_cenbaco_obroty_72_tmp:

LOAD

    hid_shop

    date(hid_data) as Data,

    hid_seg, 

    sales_gros_total as sales_gros, 

    sales_net_total as sales_net, 

    marza_1_pamp_total as marza_1_pamp

FROM [lib://QlikContainers\Prod\Cenbaco\2.QVD\3.Load\cenbaco_obroty_72_2023.qvd]

(qvd)

WHERE Month(hid_data) = '1';

 

NoConcatenate

els_mart_cenbaco_obroty_72:

LOAD

    hid_shop, 

    Data,

    hid_seg, 

    sum(sales_gros) as sales_gros, 

    sum(sales_net) as sales_net, 

    sum(marza_1_pamp) as marza_1_pamp

RESIDENT els_mart_cenbaco_obroty_72_tmp

GROUP BY hid_shop, Data, hid_seg;

 

DROP TABLE els_mart_cenbaco_obroty_72_tmp;

 

STORE els_mart_cenbaco_obroty_72 INTO [lib://QlikContainers\Prod\Cenbaco\2.QVD\3.Load\ObrotyGroupBy.qvd]

(qvd);

View solution in original post

2 Replies
Chanty4u
MVP
MVP

Try thi s

els_mart_cenbaco_obroty_72_tmp:

LOAD

    hid_shop

    date(hid_data) as Data,

    hid_seg, 

    sales_gros_total as sales_gros, 

    sales_net_total as sales_net, 

    marza_1_pamp_total as marza_1_pamp

FROM [lib://QlikContainers\Prod\Cenbaco\2.QVD\3.Load\cenbaco_obroty_72_2023.qvd]

(qvd)

WHERE Month(hid_data) = '1';

 

NoConcatenate

els_mart_cenbaco_obroty_72:

LOAD

    hid_shop, 

    Data,

    hid_seg, 

    sum(sales_gros) as sales_gros, 

    sum(sales_net) as sales_net, 

    sum(marza_1_pamp) as marza_1_pamp

RESIDENT els_mart_cenbaco_obroty_72_tmp

GROUP BY hid_shop, Data, hid_seg;

 

DROP TABLE els_mart_cenbaco_obroty_72_tmp;

 

STORE els_mart_cenbaco_obroty_72 INTO [lib://QlikContainers\Prod\Cenbaco\2.QVD\3.Load\ObrotyGroupBy.qvd]

(qvd);

Sebastian_Dec
Creator II
Creator II
Author

Thx a lot !

I thought the more is the better, and it's the other way.

From: 10 239 243 to 1 328 311 lines
104 mb -> 24 mb
Thanks & Regards,
Please close the thread by marking correct answer & give likes if you like the post.