QLIKVIEW SET ANALYSIS RELATED INTERVIEW QUESTIONS-ANSWERS

Set Analysis can be understood by a simple analogy of how Qlikview works. We make selections on certain variables and the changes reflect in the entire application. This happens because through our selection, we have created a set of data which we want to use. In a similar fashion, using Set Analysis feature, we can pre-define the data to be displayed in our charts.

Interview Questions on Set Analysis

1). Define Set Analysis and its types with examples?
Aggregation functions normally aggregate over the set of possible records defined by the current selection.
 sum( Sales )
But an alternative set of records can be defined by a set expression.
sum( {$<Year={2008}>} Sales )
Features:
• Conceptually similar to a selection.
• Provides a method of defining groups (sets) of information that are independent of the current can create sets based on other sets.
• Must be used in aggregation function.
• Always begin and end with curly brackets {}
• Very powerful functionality for comparison analysis
• May eliminate the need for additional, complex coding within an application
• Provides much more flexibility in the analysis’ you can create

2). What are Modifiers, Operators and Identifiers?
Identifiers Syntax:
0 - Represents an empty set
1 - Represents the full set of all the records in the application
$ - Represents the records of the current selection
$1 - Represents the previous selection
$_1 - Represents the next (forward) selection
Bookmark01 - Represents the bookmark ID or the bookmark name
Example:
sum({1} Sales)
Returns total sales within the application, disregarding selections but not
the dimension.
sum({$} Sales)
Returns sales for the current selection, i.e. the same as sum(Sales).
sum({$1} Sales)
Returns sales for the previous selection.
sum({Bookmark01} Sales)
Returns sales for the bookmark named “Bookmark01

Operators:
+  Union         Returns the set of all records that belong to the unioned sets
-  Exclusion     Returns records that belong to the first but not the other of the two set identifiers.
*  Intersection  Returns records that belong to both of the set identifiers.
/ Symmetric
Difference
Returns a set that belongs to either, but not both of the set identifiers.
Examples:
sum({1 - $} Sales)
Returns sales for everything excluded by the current selection.
sum({$ * Bookmark01} Sales)
Returns sales for the intersection between the current selection
and the bookmark “Bookmark01”.
sum({ - ($ + Bookmark01)} Sales)
Returns sales excluded by current selection and the bookmark
“Bookmark01”.

Modifiers:(Deals With Fields Name)
Modifiers - Examples
sum({$<OrderDate = DeliveryDate>} Sales)
Returns the sales for the current selection where OrderDate = DeliveryDate.
sum({1<Region = {US}>} Sales)
Returns the sales for region US disregarding the current selection.
sum({$<Region = >} Sales)
Returns the sales for current selection, but with the selection in “Region”
removed.
sum({<Region = >} Sales)
Returns same as the example above. When the set to modify is omitted, $
is assumed.
sum({$<Year={2000}, Region={“U*”}>} Sales)
Returns the sales for current selection, but with new selections both in
“Year” and in “Region”.

3). Explain Syntax given below:
• sum( {$<Year = {$(vLastYear)}>} Sales )
returns the sales for the previous year in relation to the current selection. Here, a variable vLastYear containing the relevant year is used in a dollar-sign expansion.
• sum( {$<Year = {$(=Only(Year)-1)}>} Sales )
returns the sales for the previous year in relation to the current selection. Here, a dollar-sign expansion is used to calculate
Previous year

4). Define Indirect Set Analysis with an example?
Set analysis was previously restricted to stating direct selections in a field. Starting with version 9, it is now possible to state selections in a field based on selections in another field.
The functions p() and e() can be used to select the set of possible or excluded values within a field.
Indirect Set Analysis
• p( ) = Possible
• e( ) = Excluded
Customer = p({<Year={$(=max(Year)-1)}>} Customer)
Returns customers who had an association to last year.
sum(({<Year={$(=max(Year))},
Customer = p({<Year={$(=max(Year)-1)} Customer>}) Sales)
Returns this year’s sales for customers who had sales last year.

5). Create a program to shows the sales figures for different categories between selected dates. For the dates option, create two calendar that takes in the start date and the end date. Use Set Analysis for this.

Comments

Archive

Contact Form

Send