GROUP BY Clause In QlikView

Introduction

The GROUP BY clause is used with group functions. The GROUP BY clause is used to retrieve data depending on one or more columns. The GROUP BY clause always contains all the columns that we have shown in a select list but not used those functions that were used with the group functions. An aggregate function mostly requires the GROUP BY statement. The GROUP BY clause is part of a SELECT Expression.

Use of GROUP BY clause in QlikView Application

Step 1: Open the QlikView application:
It is the first step, in this step you need to open the QlikView application then go to
"File" -> "New" then this window will be opened:

After clicking New option

Step 2: Open Edit Script: The second step is open the edit script window from File-> Edit Script.

window of edit Script

Step 3: Select Database:
The third step is to select a database from the Data tab and click on the Connect Button.

select database

Step 4: Data link property window: In this window we select SQL Server and click on the "Next" Button.

data link

Step 5: Connection tab:
In the connection tab, you enter the server name and user name and password and select the database from your server and click on Test Connection.

test connection

  • Then you find that the test connection succeeded and click on OK button.

    link property

  • Then click on OK button-

    ok box
Step 6: SQL Server login: Then they require a SQL Server login so you have entered a valid Login ID and Password and click on the OK button.

SQL server

Step 7: Create select statement: When we click on the Select button on the Data tab then this window will be opened.

select statement

  • Then this window will be opened and click on the OK button.

    create select

Step 8: Code of edit script: After login the SQL Server and edit script window will be opened and reload it.

reloading

Step 9: Save QlikView file: After reloading the edit script, the next step is save a QlikView file and click on the Save button.

file save

Step 10: Script execution progress: Then Script Execution progress window will be opened and require a Login Id and Password and click on the OK button.

Script execution

Step 11: Sheet property Window: After this process, the sheet property window will be opened. If you want add a field and select a field from available field and click on OK button.

  • Then this window will be opened.

    main sheet

Step 12: Final Window: Then it shows a final window.

final window

By using a GROUP BY clause this window shows those fields that we declared in a LOAD statement and also shows the sum of ID and Salary.
  
Summary

This article has described the basic concepts of a GROUP BY clause and also describes GROUP BY clauses work in QlikView.


Similar Articles