HAVING Clause In QlikView

 Introduction

The HAVING clause is used with each group of the grouped table. The HAVING clause is used with a single group as an entire result. The HAVING clause is used with aggregate functions. Examles of aggregate functions are SQL SUM function, SQL COUNT function, SQL MIN function and SQL MAX function. The HAVING clause can be used in combination with a GROUP BY clause. The HAVING clause shows only specific conditions. The HAVING clause filters the group results in the final results. The HAVING clause is always used with a GROUP BY clause. The HAVING function returns only rows where aggregate values satisfies specified conditions.

Use of HAVING clause in QlikView application

There are given some basic steps to understand the concept of a HAVING clause in QlikView.

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 a SQL Server and click on the "Next" Button.

data link

Step 5: Connection tab:
In the connection tab, you entered 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 has succeeded and click on the OK button.

    link property
     
  • Then click on the 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 in the Data tab then this window will be opened.

select statement

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

    select

  • This window will be open-

    select create

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

reload code

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

save file

Step 10: Script execution progress: Then the 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 to add a field and select a field from an available field and click on the OK button.

  • Then this window will be opened.

    main sheet

Step 12: Select Table box: Now right-click anywhere in the blank main sheet and select New Sheet Object-> Chart, then the window will be opened.

select table box

Step 13: General Window: In this window we select Add All to select all fields in the table and click on the OK button.

general window

Step 14: Main Window: Now look at this window and again open an Edit script.

main window

Step 15: Use of HAVING clause: Now we write the code of a HAVING clause and reload it.

having code

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

Script execution 1 


Step 17: Final window: Now this window will show how the HAVING clause works.

final window

Summary

This article provided the basic concepts of a HAVING clause and also described the HAVING clause works in QlikView.

Up Next
    Ebook Download
    View all
    Learn
    View all