Working with QlikView Boxes, Objects and Document Properties
1. MULTI BOXES, TABLE BOXES AND INPUT BOXES
If you closed the document and exited QlikView after the previous lesson, you need to open it again.
- Start QlikView by double-clicking the QlikView icon.
- Select the file you created in the previous chapter, named MyTutorial.qvw or something similar, directly from the File menu.
Intellipaat provides industry leading QlikView online training for mastering this top BI tool!
The multi box, or multiple dropdown list box, is a sheet object that shows several fields simultaneously in a very compact way.
How results of selections are shown in multi boxes
For each field in the multi box, there is a selection indicator telling you if the values of the field are selected, optional or excluded. A value will be shown in the multi box only if it is the single possible
(optional or selected) one.
- Clear all your selections by clicking the Clear Selections button in the toolbar.
The selection indicators of the multi box are now all white, which means that all the fields contain optional values.
- Select Dollar in the Currency list box.
Most of the fields still have white selection indicators, which mean that they contain several optional values. Dollar and Not known being the only possible values in their respective fields, they are shown in the multi box.
- Select Australian the Country list box.
Creating a multi box
- Go to the Customer
- Clear your selections.
- Click the Create Multi box button in the toolbar or choose New Sheet Object, Multi box from the Layout
The General page of the Multi Box Properties dialog box now appears. Here you can choose the fields to display in the multi box.
- Type Customer info in the Title
- Select Customer in the column listing available fields, then click Add>.
The field Customer is moved to the column of displayed fields, which means that it will appear in the multi box. Select a few more fields:
- Select Address by clicking the field in the list.
- Press CTRL while clicking the fields City, Country, and Zip.
- Click Add>.
- Click OK.
Making selections in the multi box
You make selections in a multi box in the following way:
- Clear your selections.
- Open the field Customer by clicking the arrow.
- Select Gaston HiTech. There are optional values in all the boxes.
- Open the field Country by clicking the arrow.
- Belgium and France are optional. The French address is the one you need: click France.
- Click on the multi box with the right mouse button to open the float menu.
The commands in the second group (Select Possible etc.) apply to the field you have clicked on, while the next three operate on all the fields of the multi box. If you click on the title bar of the multi box, the field-specific commands are not shown.
- Choose ...
The properties dialog of the multi box contains six pages, which look similar to those of the list box.
Promoting a field
Maybe you would prefer to let the field Zip precede Country.
- Select Zip in the column of displayed fields.
- Below the list, there are two buttons: Promote and Demote. Click Promote.
- Click OK. (The field Zip has been moved one step up in the multi box.)
- Clear your selections.
Learn more about QlikView in this insightful blog now!
The table box is a sheet object that shows several fields simultaneously. The contents are record-oriented in the same way as a normal table, i.e. the contents of one row are logically connected. The columns of the table box can be fetched from different input tables, which allow the user to create a new table from the logically possible combinations of the input tables.
Making selections in a table box
Just like the other sheet objects, the table box immediately reflects selections made in other sheet objects.
- Select a few countries in the list box Country and study the result.
- You can make selections in a table box by clicking any of the available field values or by “painting” an area:
- Select a range of values in the table box. See how the contents change.
- Clear your selections.
Creating a table box
- Go to the sheet Customer.
The sheet contains a multi box with the fields Customer, Address, City, Zip, and Country. You will now create a table box with the same fields:
- Click the Create Table Box button in the toolbar.
- The General page of the Table Box Properties dialog is now open. Enter the text Customer info in the Title
- Double-click the fields mentioned above to move them to the column of displayed fields, and then click OK.
Changing properties
Adjusting columns
The columns of the table box can be adjusted just like those of the other tables:
- Place the cursor on one of the vertical lines, then drag.
To adjust the rightmost column, place the cursor as far to the right as you can, but within the border and the scroll bar.
To assign the same size to all the columns, do the following:
- Click on one of the columns with the right mouse button.
- Choose Equal Column width from the float menu.
Sorting the table box
Just like the straight table, the table box provides excellent possibilities for sorting.
- Right-click on the column header of the column Country, then choose Sort from the float menu.
- Double-click the header of the column Customer.
The sort orders of the different fields can be set on the Sort page of the Table Box Properties dialog. Here you can also change the sort priority of the columns by means of the Promote and Demote buttons.
Printing or exporting a table box
Printing
Suppose you want to print a list of all the French customers.
- Clear all previous selections by clicking Clear Selections in the toolbar.
- In the Country list box of the Customer sheet, select France. The table box now shows all the customers that have offices in France.
- Click on the table box with the right mouse button, and then choose
The Print dialog opens.
- Click
It is also possible to choose the Print… command from the Object menu, from the File menu or from the toolbar.
Exporting
Instead of printing the table box, you can export its contents to a file:
- Click on the table box with the right mouse button, then choose .. from the float menu.
- Type Customers in France.qvo or something similar in the File name
- Click Save.
To view the result of your export, do the following:
- Open the Explorer from your Start
- Find the file, and then double-click it.
- In the dialog that opens, you can specify the program you want to use to open the file. Select e.g. Excel in the list, and then click OK.
Microsoft Excel now opens your file Customers in France.qvo.
- Close Excel and go back to QlikView.
The typical way of entering data in a variable is through the Input Box.
Entering data in an input box
- Clear all selections.
- Go to the Geography
- There you will find an input box.
- Move the input box to the Sales sheet by dragging it to the Sales sheet tab.
- Go to the Sales The input box should now be found on that sheet.
- Restore the chart Forecasted sales next year, which can be found as an icon in the bottom of the sheet.
- Double-click the icon to restore it.
- Click with the mouse in the area to the right of the “=” in the input box. The figure “10” will be marked. You are now in edit mode for the input box.
- Type “20” and press ENTER.
2. BUTTONS, TEXT OBJECTS AND LINE/ARROW OBJECTS
Buttons can be used in QlikView to perform commands or actions, e.g. exporting data to files or launching other documents. There are three types of buttons: the shortcut button, the launch/export button and the macro button.
Using a shortcut button
All the commands available for a shortcut button can also be performed in other ways in QlikView, but it is often very convenient to use a shortcut button. The Geography sheet contains a shortcut button with the text Clear selections.
- Go to the Geography
- Select one or several countries.
- Find the shortcut button Clear selections in the center of the screen and click it.
Your selections have disappeared.
Creating a shortcut button
You will now create a similar shortcut button on the Customer sheet.
- Click the Create Button icon in the toolbar.
- On the General page of the Button Properties dialog that appears, type the text Clear all selections in the Text
- Click Shortcut under Function.
- The tabs Launch and Export, which were originally present, have been replaced by the Shortcut
- Click the Shortcut
- On the Shortcut page, you can choose the command to be performed, as well as the field on which it should operate. Since the command that you wish to perform operates on all fields, the contents of the Field box will be disregarded.
- In the Function box, choose the function Clear all selections including locked.
- Click OK.
- Try your new button.
Creating an Export button
You have already learned how to export data from a table box. It is also possible to use a button to export data from specific fields.
- Go to the Sales
- Click the Create Button icon in the toolbar.
- Type the text Export in the Text
- Launch/Export is preselected under Function. Go to the Export
- Add the fields Country, Customer, Salesman, Sales, and Year to the column Export Lines.
- Click OK.
- Select a few values, and then click the Export
Exporting to a file
- Open the Properties dialog again, and go to the Export
- In the group named Export to, select File instead of Clipboard.
- The Export File dialog automatically opens. Find an appropriate location, then type a file name with the extension .csv (Comma Separated Value) in the File name box, e.g. csv.
- Select Comma Delimited in the text box Save as type.
- Click Save.
Launching the application
- Go to the Launch
- Mark the Application check box, and find the program with which you want to open the export file. Choose Excel, which should be found under Program Files.
- Click Open.
- Click OK.
- Close Excel.
- Clear your selections.
Text objects can be used in several different ways, e.g. for displaying explanatory text for the different parts of your document, or for creating multi-colored sheet backgrounds
Setting a background color using the sheet properties dialog
Your document consists of four sheets: Geography, Customer, Sales, and Tables. The sheets all have gray backgrounds. The easiest way of applying a different background color to a sheet is the following:
- Click on the sheet Geography with the right mouse button and choose Sheet Properties….
- On the General page select Sheet Settings in the Background group, mark the Color check box and press the color button.
- Pick a navy blue color from the color map, then click OK and close the properties dialog.
Setting a background using text objects
- Click the Create Text Object button in the design toolbar.
- Make sure that the Opaque Fixed option is marked in the Background group, then click the Color
- Pick a navy blue color from the map, then click OK and close the properties dialog.
- Move and size the text object until it covers the upper part of the sheet, including the list boxes Customer ID, Country and Customer, as well as the multi box Customer info.
Line/arrow objects can be used e.g. for dividing the sheet layout or for pointing out a certain sheet object etc. We will use a horizontal line to emphasize the sectioning of the sheet established by the text object background we just created.
1 .Select the sheet Customer.
2. Click the Create Line/Arrow button in the design toolbar.
The General page of the Line/Arrow Properties dialog appears.
3. Choose Horizontal orientation.
4. Choose a fixed white color.
5. Choose a Line Weight of 5 and a continuous line as Line Style.
6. Choose line without arrow as Arrow Style.
7. Click OK.
A white horizontal line will now appear on the sheet.
8. Move the line with the mouse so that it lies over the border between the two background colors.
9. Size the line to the left and to the right so that it covers the entire width of the sheet.
3. SLIDER OBJECTS AND BOOKMARK OBJECTS
The slider objects offer a graphical way of manipulating selections in a field or data in a variable. It is a very versatile object but in this lesson we will only demonstrate one of its uses by connecting a slider to a field.
- Go to the Sales
- Clear your selections.
- Click the Create Slider button in the toolbar or choose New Sheet Object, .. from the Layout menu.
- The General page of the Slider Properties dialog box now appears. Slider objects can be used to control a field or one or two variables. In this example we will use it for controlling selections in the field Month
- Choose Month in the Field drop-down box.
- Choose Multi Value in the Mode
- Click OK.
- Select months 7, 8 and 9 in the Months list box. A thumb will appear in the slider object.
- Point at the thumb and drag it. Notice the pop-up showing the months corresponding to the current position of the thumb.
- Release the mouse button. The selections in the list box will shift in line with the slider position.
- Position the cursor on one of the slider thumb’s short ends. Click and drag.
- The range of selections will narrow or widen accordingly.
- Release the mouse button and the new selection takes effect.
- Clear selections. The thumb disappears from the slider object.
- Click inside the slider area (between the arrows) and paint a selection with the mouse. The thumb will reappear.
-
Creating a bookmark object
In a bookmark object you can select between existing bookmarks in a dropdown list and, depending on configuration, add new and delete old bookmarks.
Let’s create a bookmark object:
- Go to the Sales
- Clear your selections
- Click the Create Bookmark object button in the toolbar or choose New Sheet Object, Bookmark object… from the Layout
- The General page of the Bookmark objects Properties dialog box now appears. In this case we do not need to change any of the default settings.
- Click OK.
- Make a few selections in some list boxes and then click the Add Bookmark
- Type a name for the new bookmark in the dialog that appears. Then click OK.
- Clear your selections.
- Select your bookmark in the dropdown list in the bookmark object.
4. DOCUMENT PROPERTIES, USER PREFERENCES AND RELOAD
-
Setting Document Properties
Until now, you have been changing the properties of individual sheet objects. However, you will often find yourself in a situation where you would like to give the same appearance to all the sheet objects of the document or format several fields at the same time.
Setting an opening picture and an opening sound
- On the Opening page, you can further improve your document by choosing a picture and/or a sound to be shown or played, respectively, when the document is opened:
- Go to the Opening page that you find in the Document Properties in the Settings
- Select the check box Image.
- Select the file bmp in the dialog that opens, then click Open.
- By check-marking one of the three following options, you decide how the picture will be closed. Select Close After 10 Seconds, but change the number to 5.
- Check-mark the option Sound.
- Select the file wav in the dialog that opens, then click Open.
- Click OK.
If you have done everything correctly, you will now get a demonstration of the opening sound and the opening picture.
- Save the document.
Setting properties
Sorting all future list boxes containing the field Area
- Choose Document Properties from the Settings
- Go to the Sort
- You recognize the sort options from the List Box Properties The Fields box on the left contains a list of all the fields in the document.
- Here you can select one or several fields to set their sort order:
- Select Area(km.sq).
- You see that the field is sorted by numeric value, descending. Suppose
- you want the field sorted by numeric value, ascending instead:
- Select Ascending.
- Click OK.
- Create a new list box containing the field Area and note its sort order
Applying the same border to all the sheet objects
- Choose Document Properties from the Settings
- Go to the Layout
- Check Use Borders.
- Choose the style Walled.
- Check Rounded Shapes.
- Make sure that Corner Radius is set to 7 pixels, Squareness to 2 and that all four corners are marked.
- In the Apply to list, select all objects except buttons, text objects and line/arrow.
- Click OK. The change is implemented throughout the entire document.
- Save the document.
The User Preferences dialog, found in the Settings menu, contains a number of settings concerning your way of working with QlikView.
- Click the Reload button in the toolbar (or choose Reload from the File menu).
If the source data has changed, all your sheet objects are instantly updated to reflect the changes (in this case, no new data has been added).
Read these top trending Qlikview interview questions and answers to get a best job soon!