How to Collect Data using QlikView Plug-in
This article will show you how to create an Element (Report in this case) using a QlikView plug-in as a Data Source. It assumes that you have already established connectivity to your QlikView server.
1. Access New > Metric
Provide the basic information required for creating a new metric:
- Define this Metric's Measure. If you do not see the measure that you want to use, you can create one directly from the bottom of this drop-down list
- Select the Measurement Interval that applies to your element
- Give the element a unique Name
- Optionally, assign a Category.
- Click Next: define details to proceed with defining Data Collection details
NOTE: To create a dimensioned Metric, you first need to create a Dimension sourced from the same data source.
2. Configure Data Collection
- Select the QlikView plugin serving as a Data Source for this Metric
- Set the Data Collection Trigger which is going to initiate updating information in this Metric
- Select a QlikView Object that should become a basis for this particular Metric
- Input Plugin Command manually (you may reference a table with parameters below) or use a Visual Editor
2.1. Example using the Visual Editor
The Qlikview Query Builder is called by Visual Editor link
- Select Fields and set Expressions
- You can pre-filter the information before fetching it into Metric Insights. To do so, add Filters in the Query Builder
- Optionally you can add 'ascending' and 'descending' Sorting to the field values
Save your settings. Command validation will start automatically.
The query must include the columns, listed in the hint box to the right of the Plug-in command field:
- MI dimension (for dimensioned Metrics and Reports only);
- measurement datetime
- measurement value
3. Collect Data for the Metric
If entering plug-in command manually:
- Validate the command. If your statement is valid, the statement box is green; if there are any errors, the box is colored in red and errors will be explained in the field below.
- Collect Data
- At the upper right corner of the screen click Enable and Publish to save the element and make it available to other users in the system
[Result] Metric will be displayed in viewer
Alternative Plug-in Commands
If you want to query using a specific Dimension value then you would
- Modify the Metric Dimension and
- Add the extra selection of the Dimension value using the format:
fields = <Value1>, <Value2>
Where FIELD is the field name in QlikView that has the selections of the Dimension values.
From the example above you add:
?Company = Facebook, Twitter
So that final plug-in command becomes:
fields = Company, Date, Number of tweets ?Company = Facebook, Twitter
Select Specific Dimension values using Select Listbox
An alternate approach to query using a specific Dimension value uses the following format:
?select = <ListBoxID>, <Value1>, <Value2>
Where the ListBoxID is the control in QlikView that has the selections of the Dimension values.
From the example above, add:
?select = LB122, Facebook, Twitter
Final plug-in command becomes:
fields = Company, Date, Number of tweets ?select = LB122, Facebook, Twitter