Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group By ?

Hi All,

I want to know hot use group by in QLikview with Some examples is great ful for me ...

Warm,

Heather

1 Solution

Accepted Solutions
its_anandrjs

Hi,

Very simple example suppose i need to sum up the values of the regions in the back end so i group the sales sum in the regions wise.

Source:

LOAD * Inline

[

Region,Customer,Sales

R1,C1,4863

R2,C2,1263

R3,C2,1475

R3,C3,1256

];

Query:

Load

Region,

Sum(Sales) as SaleAmt

Resident Source

Group By

Region;

Then i get another table as Sum up sales with region

RegionSaleAmt
R14863
R21263
R32731

Hope this helps

Anand

View solution in original post

4 Replies
MK_QSL
MVP
MVP

Sales:

Load

     Customer,

     InvoiceDate,

     Sales

From TableName;

TotalSales:

Load

     Customer,

     SUM(Sales) as TotalSales

Resident Sales

Group By Customer;

senpradip007
Specialist III
Specialist III

its_anandrjs

Hi,

Very simple example suppose i need to sum up the values of the regions in the back end so i group the sales sum in the regions wise.

Source:

LOAD * Inline

[

Region,Customer,Sales

R1,C1,4863

R2,C2,1263

R3,C2,1475

R3,C3,1256

];

Query:

Load

Region,

Sum(Sales) as SaleAmt

Resident Source

Group By

Region;

Then i get another table as Sum up sales with region

RegionSaleAmt
R14863
R21263
R32731

Hope this helps

Anand

Anonymous
Not applicable
Author

HI!

The group by clause is used to retrieve data depending of one or more columns. For example:

LOAD

     Product,

     Customer,

     sum(qty) as Quantity

FROM

Test.qvd(qvd)

GROUP BY Product, Customer;

This sentence will bring will return the Quantity column as a sum o qty grouped by the diferents combinations of Product and Customer. Group by clause must include all fields where there's no agregation on it.

Regards,

Gabriel