- QlikView - Navigation
- QlikView - Architecture
- QlikView - Desktop Installation
- QlikView - Overview
- QlikView - Home
QlikView Data Loading
- QlikView - Data - files(QVD)
- QlikView - Incremental Load
- QlikView - Preceding Load
- QlikView - Resident Load
- QlikView - Inline Data
- QlikView - Database
- QlikView - Web file
- QlikView - XML file
- QlikView - Delimited file
- QlikView - Excel file
QlikView Report Interface
- QlikView - Dashboard
- QlikView - Pie Chart
- QlikView - Bar Chart
- QlikView - Text Object
- QlikView - Multi Box
- QlikView - List Box
- QlikView - Documents
- QlikView - RangeSum Function
- QlikView - Peek Function
- QlikView - Rank Function
- QlikView - Match Function
- QlikView - Aggregate Functions
- QlikView - IntervalMatch
- Qlikview - Functions
- QlikView - Scripting
- QlikView - Sheet and Objects
QlikView Data Transformation
- QlikView - Rotating Tables
- QlikView - Column Manipulation
- QlikView - Fill Function
- QlikView - Transformation Wizard
QlikView Data Model
- QlikView - Generating Data
- QlikView - Synthetic Key
- QlikView - Star Schema
- QlikView - Dimensions & measures
QlikView Data Analysis
- QlikView - Circular Reference
- QlikView - Mapping Tables
- QlikView - Master Calendar
- QlikView - Concatenation
- QlikView - Keeps
- QlikView - Joins
- QlikView - Set Analysis
- QlikView - Pivot Tables
- QlikView - Straight Tables
- QlikView - Cross Tables
Qlikview Useful Resources
- Qlikview - Discussion
- Qlikview - Useful Resources
- Qlikview - Quick Guide
- Qlikview - Questions/Answers
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
QpkView - Keeps
The keep command in QpkView is used to combine data from two data sets keeping both the data sets available in memory. It is very similar to joins we covered in the previous chapter except for two major differences. First difference is − in case of keep; both the datasets are available in QpkView s memory while in join the load statements produce only one data set from which you have to choose the columns. The second difference being − there is no concept of outer keep where as we have outer join available in case of joins.
Input Data
Let us consider the following two CSV data files, which are used as input for further illustrations.
Product List: ProductID,ProductCategory 1,Outdoor Recreation 2,Clothing 3,Costumes & Accessories 4,Athletics 5,Personal Care 6,Hobbies & Creative Arts Product Sales: ProductID,ProductCategory,SaleAmount 4,Athletics,1212 5,Personal Care,5211 6,Hobbies & Creative Arts,1021 7,Display Board,2177 8,Game,1145 9,soap,1012 10,Beverages & Tobacco,2514
Inner Keep
We load the above input data using the script editor, which is invoked by pressing Control+E. Choose the option Table Files and browse for the Input file. Then we edit the commands in the script to create an inner keep between the tables.
Inner keep fetches only those rows, which are present in both the tables. In this case, the rows available in both Product List and Product Sales table are fetched. We create a Table Boxes using the menu Layout → New Sheet Objects → Table Box.
First, we choose only the productSales table, which gives us the fields - ProductID, ProductCategory and SaleAmount to be displayed.
Next, we choose the ProductList data set, which gives us the fields ProductID and ProductCategory.
Finally, we choose the All Tables option and get all the available fields from all the tables.
The following report shows all the Tables Boxes from the above given steps.
Left Keep
Left keep is similar to left join, which keeps all the rows from the table in the left along with both the data set being available in QpkView s memory.
Left keep Script
The following script is used to create the resulting data sets with left keep command.
productsales: LOAD ProductID, ProductCategory, SaleAmount FROM [C:Qpkviewdataproduct_psts.csv] (txt, codepage is 1252, embedded labels, depmiter is , , msq); left keep(productsales) productpsts: LOAD ProductID, ProductCategory FROM [C:QpkviewdataProductsales.csv] (txt, codepage is 1252, embedded labels, depmiter is , , msq);
Left keep Data
When we change the script as above and refresh the data in the report using Control+R, we get the following data in the sheet objects.
Right Keep
Right keep is similar to left join, which keeps all the rows from the table in the right along with both the data set being available in QpkView s memory.
Right keep Script
The following script is used to create the resulting data sets with left keep command.
productsales: LOAD ProductID, ProductCategory, SaleAmount FROM [C:Qpkviewdataproduct_psts.csv] (txt, codepage is 1252, embedded labels, depmiter is , , msq); right keep(productsales) productpsts: LOAD ProductID, ProductCategory FROM [C:QpkviewdataProductsales.csv] (txt, codepage is 1252, embedded labels, depmiter is , , msq);
Right keep data
When we change the script as above and refresh the data in the report using Control+R, we get the following data in the sheet objects.
Advertisements