Tags can be very powerful in QlikView application development.
Tag function provides a way to assign Tags to a field. Fields not present in the document are ignored.
Tags provide a way to group dimensions and measures together while creating charts.
There are different kinds of system tags but here we will discuss $dimension and $measure.
Tags $dimension and $measure can be enabled or disabled by the users in the document properties/Tables.
$dimension – denotes a field recommended for the use in the chart dimensions,list boxes etc.
$measure – denotes a field recommended for use in the expression.
We will see the benefits of using $dimension and $measure
I will explain the use of Tags with an example below.
I will load few dimensions and a Fact table.
If you will see the table viewer of these tables and hover over the fields , you will observe tags like $ascii,$text. These are system tags generated after the script generation. These tags can be altered or overidden in the script. There are other tags like $synthetic,$key which cannot be changed by the users.
You will observe the absence of $dimension and $measure tags.
Chart without defining dimension or measure Tags –
If you will create a chart without assigning $dimension or $measure tags, you will see the dimension and measures are listed without any order.
This can be a big nuisance if application have large number of dimensions and measures because users need to scroll thru and locate the dimensions. Similarly while creating an expression, user need to look thru all the fields to locate the measures.
How to assign tags and benefits
You can go to document properties/Tables to specify which fields you want to specify as dimensions or facts
Once $dimension and $measure tags are assigned to the field, you will see how they are helpful in creating charts.
All dimensions will be listed on the top on the Dimensions tab in the chart and all measures will be listed on the top in the expressions tab. This is helpful when you have large number of fields. User don’t have to go thru all the fields and search for dimensions and facts.
Fields can also be tagged using Mapping Table and using Tag function.
You can create an Inline table or an xls like below to perform mapping load
In script editor , you can perform Mapping load and use tag function
Tags are very helpful in self service dashboards, where executive users create their own objects on access point. Users need not know the technical aspects of the data. Tags provide them a clear way of identifying dimensions and measures.