

{"id":44275,"date":"2018-12-05T10:51:29","date_gmt":"2018-12-05T05:21:29","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=44275"},"modified":"2018-12-05T15:44:48","modified_gmt":"2018-12-05T10:14:48","slug":"qlik-sense-visualization-expressions","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/","title":{"rendered":"Qlik Sense Visualization Expressions &#8211; Aggregation &amp; Modifiers"},"content":{"rendered":"<h2><span style=\"font-weight: 400\">1. Objective<\/span><\/h2>\n<p><span style=\"font-weight: 400\">In our last tutorial, we discussed <a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-selections\/\"><strong>Qlik Sense Selections<\/strong><\/a>. In this tutorial, we are going to learn about the Qlik Sense Visualization Expressions. Also, we will see how to use Visualization Expressions in Qlik Sense. Visualization expressions are similar to the<strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-gauge-chart\/\"> chart<\/a><\/strong> expressions we learned in QlikView. <\/span><\/p>\n<p><span style=\"font-weight: 400\">So, let&#8217;s start with Qlik Sense Visualization Expressions tutorial.<\/span><\/p>\n<div id=\"attachment_44289\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-44289\" class=\"wp-image-44289 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg\" alt=\"Qlik Sense Visualization Expressions\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-44289\" class=\"wp-caption-text\">Qlik Sense Visualization Expressions &#8211; Aggregation &amp; Modifiers<\/p><\/div>\n<h2><span style=\"font-weight: 400\">2. What are Visualization Expressions in Qlik Sense?<\/span><\/h2>\n<p><span style=\"font-weight: 400\">An expression used in any coding language is like an instruction that instructs the machine how to process the given data. Similarly, in Qlik Sense the visualization expressions are the instruction which when applied on specific data fields, process the field values in the instructed way and display the result in the visualization. A visualization expression comprises of fieldnames, mathematical or <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-logical-functions\/\">logical functions<\/a><\/strong> and operators (*\/+-). The expressions can be created to be applied to static as well as dynamic fields. Usually, logical and <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/\">mathematical functions<\/a><\/strong> are used on measures (numerical and calculable fields) only, but the visualization expressions are applicable on dimensions (static text fields like table\u2019s title, field title etc.) as well. By making dimensions dynamic using visualization expressions, such values will change according to the <strong><a href=\"https:\/\/data-flair.training\/blogs\/selections-in-qlik-sense\/\">selections made in the visualization<\/a><\/strong> or any associated sheet object for that matter. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">i. Qlik Sense Visualization Expressions Syntax<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Let\u2019s move on to learn the visualization expression\u2019s general syntax. The syntax is created using the <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-backus-naur-form-bnf\/\">concepts and rules of Backus-Naur formalism<\/a><\/strong>. Varied types of visualization expression syntax generally used are listed below,<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">expression ::= (constant | expressionname | operator1 expression | expression operator2 expression | function | aggregation function |(expression))<\/pre>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">This translates to: an expression can be defined as <\/span><b>constant<\/b><span style=\"font-weight: 400\"> string having text or numbers. The text is enclosed in single quotation marks. <\/span><\/li>\n<li style=\"font-weight: 400\"><b>Expressionname<\/b><span style=\"font-weight: 400\"> is the name or label of an already existing expression in the same visualization.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Operator1<\/b><span style=\"font-weight: 400\"> stands for a unary operator that applies only to the values on the right. <\/span><\/li>\n<li style=\"font-weight: 400\"><b>Operator2<\/b><span style=\"font-weight: 400\"> is a binary operator that applies to the values on both sides of the operator.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A function is applied following the syntax- <\/span><\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">function ::= functionname ( parameters )\r\nprameters ::= expression { ,expression }<\/pre>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Aggregation functions can also be defined,<\/span><\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">aggregationfunction ::= aggregationfunctionname ( parameters2 )\r\nparameters2 ::= aggrexpression { , aggrexpression }<\/pre>\n<h2><span style=\"font-weight: 400\">3. Aggregation Functions in Qlik Sense<\/span><\/h2>\n<p><span style=\"font-weight: 400\"><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-aggregation-functions\/\">Aggregation is a crucial function<\/a><\/strong> to be used in any <strong><a href=\"https:\/\/data-flair.training\/blogs\/business-intelligence-tools\/\">Business Intelligence tool<\/a><\/strong> because it covers the data being evaluated as a whole\/aggregate and returns result accordingly. This is of great use because generally enterprises use data in bulk and applying functions on individual fields and value could be a next to impossible task. Most commonly used aggregate functions are Sum, Average, Min, Max etc. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">i. Defining the Scope of Aggregation<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Every time aggregation is applied on a data set, the scope of aggregation must be defined. By scope it is meant that which data values or records are relevant. Aggregation is only applied over the relevant data hence defining scope is necessary. Scope is defined based on two factors, one is Selections and second is Dimensional values. Once these two factors are considered and applied, then after restricting them what remains is only the relevant data values for aggregation. <\/span><\/p>\n<p><span style=\"font-weight: 400\">During <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-career\/\">defining the scope of Qlik Sense<\/a><\/strong> aggregation i.e. setting the limit so that the system takes up only the relevant data is selected by the means of two methods; Total Qualifier and\/or Set Analysis. It can also be said that by these methods the scope of aggregation can be re-defined. These methods are used to disregard irrelevant data records so that aggregation function can only be applied to the relevant data values. The method keywords are written within the aggregate function keyword. <\/span><\/p>\n<p><span style=\"font-weight: 400\">The points given below describes the methods in detail.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><b>TOTAL Qualifier<\/b><span style=\"font-weight: 400\">&#8211; Using the total qualifier inside your aggregation expression or function disregards the dimensional value. The aggregation will be performed on all possible field values and the calculation is made disregarding all visualization dimension variables except those listed. Such fields that are not currently a dimension in a visualization may be included in the list as well. It is known to be useful in the case of group dimensions, where the dimension fields are not fixed. <\/span><\/li>\n<li style=\"font-weight: 400\"><b>Set Analysis<\/b><span style=\"font-weight: 400\"> &#8211; Using set analysis inside your aggregation expression overrides the selection and the aggregation will be performed on all values split across the dimensions.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>TOTAL qualifier and set analysis<\/b><span style=\"font-weight: 400\"> &#8211; Using the TOTAL qualifier and set analysis inside your aggregation expression overrides or disregards the selection and disregards the dimensions.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>ALL qualifier<\/b><span style=\"font-weight: 400\"> &#8211; Using the ALL qualifier inside your aggregation expression disregards the selection and the dimensions. The same can be done using the {1} set analysis statement and the TOTAL qualifier:<\/span><\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">=sum(A11 Sales)\r\n=sum({1} Total Sales)<\/pre>\n<p>Let us understand these methods through example. A sample data has been used for the example.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">AggregationScope:\r\nLOAD * inline\r\nYear Quarter Amount\r\n2017 Q1 1100\r\n2017 Q2 1700\r\n2017 Q3 1400\r\n2017 Q4 1800\r\n2018 Q1 1000\r\n2018 Q2 1300\r\n2018 Q3 1100\r\n2018 Q4 1400] (delimiter is \u2018 \u2018);<\/pre>\n<p><span style=\"font-weight: 400\">We will see how the Total Qualifier and Set analysis methods work in restricting irrelevant data values for aggregation. The two methods can be used individually or in combination.<\/span><\/p>\n<p><strong>Recommended Reading &#8211; <a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-field-functions\/\">Qlik Sense Field Functions<\/a><\/strong><\/p>\n<ul>\n<li style=\"font-weight: 400\"><b>Total<\/b><span style=\"font-weight: 400\"><strong>\u00a0Qualifier<\/strong> is used in the aggregation function when you want the system to disregard the dimensional value i.e. the data values specific to the field \u2018Quarter\u2019. The fourth column or field in the table given below uses TOTAL qualifier within a Sum aggregate function \u2018<\/span><i><span style=\"font-weight: 400\">Sum(TOTAL Amount)<\/span><\/i><span style=\"font-weight: 400\">&#8216; which displays the sum total of all the values in the field \u2018<\/span><i><span style=\"font-weight: 400\">Sum(Amount)<\/span><\/i><span style=\"font-weight: 400\">\u2019. Values from the field in which total qualifier was applied is then used in the expression \u2018<\/span><i><span style=\"font-weight: 400\">Sum(Amount)\/Sum(TOTAL Amount)<\/span><\/i><span style=\"font-weight: 400\">\u2019 which gives the percentage ratio of individual dimension values to the total amount. <\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><b>Year<\/b><\/td>\n<td><b>Quarter<\/b><\/td>\n<td><b>Sum(Amount)<\/b><\/td>\n<td><b>Sum(TOTAL Amount)<\/b><\/td>\n<td><b>Sum(Amount)\/Sum(TOTAL Amount)<\/b><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><span style=\"font-weight: 400\">3000<\/span><\/td>\n<td><span style=\"font-weight: 400\">3000<\/span><\/td>\n<td><span style=\"font-weight: 400\">100%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2017<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q2<\/span><\/td>\n<td><span style=\"font-weight: 400\">1700<\/span><\/td>\n<td><span style=\"font-weight: 400\">3000<\/span><\/td>\n<td><span style=\"font-weight: 400\">56.7%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2018<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q2<\/span><\/td>\n<td><span style=\"font-weight: 400\">1300<\/span><\/td>\n<td><span style=\"font-weight: 400\">3000<\/span><\/td>\n<td><span style=\"font-weight: 400\">43.3%<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><b>Set Analysis<\/b><span style=\"font-weight: 400\"> method is used when some selections made in the visualization are to be disregarded. It is different from the total qualifier because it is used when we want to disregard the dimensional values. Whereas in the case of disregarding selections, the system disregards selections made by the user and takes in all the data values from a field. <\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">As done in the sample visualization below. The set analysis is included with Sum aggregation function \u2018<\/span><i><span style=\"font-weight: 400\">Sum({1} Amount)<\/span><\/i><span style=\"font-weight: 400\">\u2019. In this field, all of the values which are not present in the \u2018<\/span><i><span style=\"font-weight: 400\">Sum(Amount)<\/span><\/i><span style=\"font-weight: 400\"> column (because Q2 is selected) are present as a result of disregarding the selection made on Q2. The {1} in this expression denotes set definition and instructs the machine to ignore the selections and consider all of the values in the record. <\/span><\/p>\n<p><span style=\"font-weight: 400\">The final expression for calculating the percentage is \u2018Sum(Amount)\/Sum({1} Amount)\u2019 gives as a result the ratio of the values in Sum(Amount) field that includes selections to the values of the field Sum({1} Amount) where set analysis is applied. <\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Year<\/b><\/td>\n<td><b>Quarter<\/b><\/td>\n<td><b>Sum(Amount)<\/b><\/td>\n<td><b>Sum({1} Amount)<\/b><\/td>\n<td><b>Sum(Amount)\/Sum({1}Amount)<\/b><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><span style=\"font-weight: 400\">3000<\/span><\/td>\n<td><span style=\"font-weight: 400\">10800<\/span><\/td>\n<td><span style=\"font-weight: 400\">27.8%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2017<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q1<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1100<\/span><\/td>\n<td><span style=\"font-weight: 400\">0%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2017<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q3<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1400<\/span><\/td>\n<td><span style=\"font-weight: 400\">0%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2017<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q4<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1800<\/span><\/td>\n<td><span style=\"font-weight: 400\">0%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2017<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q2<\/span><\/td>\n<td><span style=\"font-weight: 400\">1700<\/span><\/td>\n<td><span style=\"font-weight: 400\">1700<\/span><\/td>\n<td><span style=\"font-weight: 400\">100%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2018<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q1<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1000<\/span><\/td>\n<td><span style=\"font-weight: 400\">0%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2018<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q3<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1100<\/span><\/td>\n<td><span style=\"font-weight: 400\">0%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2018<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q4<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1400<\/span><\/td>\n<td><span style=\"font-weight: 400\">0%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2018<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q2<\/span><\/td>\n<td><span style=\"font-weight: 400\">1300<\/span><\/td>\n<td><span style=\"font-weight: 400\">1300<\/span><\/td>\n<td><span style=\"font-weight: 400\">100%<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><span style=\"font-weight: 400\">You can also use <\/span><b>TOTAL qualifier<\/b><span style=\"font-weight: 400\"> and <\/span><b>set analysis<\/b><span style=\"font-weight: 400\"> together. As you can see we have applied the two methods together in the column \u2018<\/span><i><span style=\"font-weight: 400\">Sum({1}TOTAL Amount)<\/span><\/i><span style=\"font-weight: 400\">\u2019. This will disregard both the dimensional value and active selections to only present the relevant data.<\/span><\/li>\n<\/ul>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/inter-record-functions-in-qlik-sense\/\">You must read Qlik Sense Inter Record Functions<\/a><\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Year<\/b><\/td>\n<td><b>Quarter<\/b><\/td>\n<td><b>Sum(Amount)<\/b><\/td>\n<td><b>Sum({1}TOTAL Amount)<\/b><\/td>\n<td><b>Sum(Amount)\/Sum({1}TOTAL Amount)<\/b><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><span style=\"font-weight: 400\">3000<\/span><\/td>\n<td><span style=\"font-weight: 400\">10800<\/span><\/td>\n<td><span style=\"font-weight: 400\">27.8%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2017<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q2<\/span><\/td>\n<td><span style=\"font-weight: 400\">1700<\/span><\/td>\n<td><span style=\"font-weight: 400\">10800<\/span><\/td>\n<td><span style=\"font-weight: 400\">15.7%<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2018<\/span><\/td>\n<td><span style=\"font-weight: 400\">Q2<\/span><\/td>\n<td><span style=\"font-weight: 400\">1300<\/span><\/td>\n<td><span style=\"font-weight: 400\">10800<\/span><\/td>\n<td><span style=\"font-weight: 400\">12%<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">General Aggregation syntax<\/span><\/p>\n<p><span style=\"font-weight: 400\">The general syntax used when defining an aggregate function\/expression is,<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Aggrexpression ::= ( fieldref | operator1 aggrexpression | aggrexpression operator2 aggrexpression | functioninaggr |(aggrexpression) )<\/pre>\n<p><span style=\"font-weight: 400\">Where <\/span><i><span style=\"font-weight: 400\">fieldref<\/span><\/i><span style=\"font-weight: 400\"> is a field name and <\/span><i><span style=\"font-weight: 400\">functionaggr<\/span><\/i><span style=\"font-weight: 400\"> stands for <\/span><i><span style=\"font-weight: 400\">functionname (parameters2)<\/span><\/i><span style=\"font-weight: 400\">.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">4. Set Analysis and Set Expressions <\/span><\/h2>\n<p><span style=\"font-weight: 400\">Set Analysis is a very <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-advantages-and-limitations\/\">useful feature given in Qlik Sense<\/a><\/strong> that enables users to compare sets of data within a document. In set analysis, you can select a set of data values (selections applied or not applied) and make it static. That means a particular data set chosen for set analysis will not be associated with other sheet objects and not change with any selections made. Thus, it becomes static. Although, before making a visualization dataset static, there must be a set expression applied to the values in the data set. All the values will be evaluated as instructed by the set expression and the result of that calculation is displayed on the static set analysis box. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Thus, the set expression defines the set of field values and when these defined field values are evaluated according to the set expression, then it is called set analysis. We have a separate tutorial explaining set analysis you can go and check to understand this concept better. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">i. Set Expression syntax<\/span><\/h3>\n<p><span style=\"font-weight: 400\">The syntax of the set expression is explained here in the backus-naur form. <\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">set_expression ::= {set_entity { set_operator set_entity }}\r\nset_entity ::= set_identifier [ set_modifier ]\r\nset_identifier ::= 1 | $ | $N | $_N | bookmark_id |bookmark_name\r\nset_operator ::= + | - | * | \/\r\nset_modifier ::= &lt; field_selection {, field_selection } &gt;\r\nfield_selection ::= field_name [ = | += | \u2013= | *= | \/= ] element_set_expression\r\nelement_set_expression ::= element_set { set_operator element_set }\r\nelement_set ::= [ field_name ] | { element_list } | element_function\r\nelement_list ::= element { , element }\r\nelement_function ::= ( P | E ) ( [ set_expression ] [ field_name ] )\r\nelement ::= field_value | \" search_mask \"<\/pre>\n<p><span style=\"font-weight: 400\">There are two syntax rules while writing a set expression are the set expression must always be an aggregation function (Sum, Max, Min , Count, Avg etc.). And the second rule is that a set expression must be enclosed in curved brackets {}. For example, the expression <\/span><span style=\"font-weight: 400\">Sum({$&lt;Year={2017}&gt;} Sales )<\/span><span style=\"font-weight: 400\">, the \u00a0expression {$&lt;Year={2017}&gt;} is the set expression. A set expression is made up of three parts; Identifier, Operator and Modifier. <\/span><\/p>\n<h2><span style=\"font-weight: 400\">5. Set modifiers <\/span><\/h2>\n<p><span style=\"font-weight: 400\">Set modifiers are used when you want to change or modify an existing state of selections in a set. You can write such modifications in the set expressions in different ways. While writing a modification in a set expression, the field name is given in &lt;&gt; brackets and the selections which must be made on that field is given in {} brackets. For example, <\/span><span style=\"font-weight: 400\">Year={2017,2018},Region={US}&gt;<\/span><span style=\"font-weight: 400\"> or <\/span><span style=\"font-weight: 400\">&lt;[Sales Region]={\u2019West coast\u2019, \u2019South America\u2019}&gt;.<\/span><\/p>\n<p><strong>Recommend Reading &#8211;<\/strong> <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-histogram\/\">Qlik Sense Histogram Visualizations<\/a><\/strong><\/p>\n<p><span style=\"font-weight: 400\">Set modifiers are written in different ways, such as some based on the values of another field, based on element sets, or forced exclusion.<\/span><\/p>\n<p>So, this was all in Qlik Sense Visualization Expressions Tutorial. Hope you like our explanation<\/p>\n<h2><span style=\"font-weight: 400\">6. Conclusion<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Hence, in this Qlik Sense Visualization Expressions tutorial, we learned about how Qlik Sense Visualization Expressions are written. Also, we saw how is the scope of Qlik Sense aggregation defined, what are set expressions and how are these expressions modified. Learning about how to use visualization expressions in Qlik Sense visualization helps the user to interact and manage the data fields and values properly.<\/span><\/p>\n<p>Still, if you want to ask any query related to Qlik Sense Visualization Expressions, you can freely ask in comments.<\/p>\n<p><strong>See also &#8211;\u00a0<\/strong><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-system-functions\/\">Qlik Sense System Functions<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/help.qlik.com\/en-US\/sense\/November2018\/Subsystems\/Hub\/Content\/Sense_Hub\/ChartFunctions\/visualization-expressions.htm\">Reference for Qlik Sense\u00a0<\/a><\/strong><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1707,&quot;href&quot;:&quot;https:\\\/\\\/help.qlik.com\\\/en-US\\\/sense\\\/November2018\\\/Subsystems\\\/Hub\\\/Content\\\/Sense_Hub\\\/ChartFunctions\\\/visualization-expressions.htm&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251209192628\\\/https:\\\/\\\/help.qlik.com\\\/en-US\\\/sense\\\/November2018\\\/Subsystems\\\/Hub\\\/Content\\\/Sense_Hub\\\/ChartFunctions\\\/visualization-expressions.htm&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-11 06:57:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-16 01:05:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-19 18:05:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-04 12:27:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-12 21:34:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-19 04:26:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-28 07:54:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-06 09:32:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 02:12:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 15:06:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-22 14:51:37&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-05 08:25:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-09 03:10:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 05:51:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-08 01:32:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 12:29:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-21 05:01:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-11 15:48:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-15 00:56:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-15 11:43:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-21 20:56:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-01 19:47:51&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-01 19:47:51&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective In our last tutorial, we discussed Qlik Sense Selections. In this tutorial, we are going to learn about the Qlik Sense Visualization Expressions. Also, we will see how to use Visualization Expressions&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":44289,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17408],"tags":[393,17821,17823,17825,17824,17822],"class_list":["post-44275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qlik-sense-tutorials","tag-aggregation-functions","tag-qlik-sense-visualization-expressions","tag-set-analysis","tag-set-expressions","tag-set-modifers","tag-visualization-expressions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Qlik Sense Visualization Expressions - Aggregation &amp; Modifiers - DataFlair<\/title>\n<meta name=\"description\" content=\"Qlik Sense Visualization Expressions,Aggregation functions in Qlik Sense,Set analysis, Set Modifiers,Set expressions,how to modify expressions\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Qlik Sense Visualization Expressions - Aggregation &amp; Modifiers - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Qlik Sense Visualization Expressions,Aggregation functions in Qlik Sense,Set analysis, Set Modifiers,Set expressions,how to modify expressions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-05T05:21:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-05T10:14:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Qlik Sense Visualization Expressions - Aggregation &amp; Modifiers - DataFlair","description":"Qlik Sense Visualization Expressions,Aggregation functions in Qlik Sense,Set analysis, Set Modifiers,Set expressions,how to modify expressions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/","og_locale":"en_US","og_type":"article","og_title":"Qlik Sense Visualization Expressions - Aggregation &amp; Modifiers - DataFlair","og_description":"Qlik Sense Visualization Expressions,Aggregation functions in Qlik Sense,Set analysis, Set Modifiers,Set expressions,how to modify expressions","og_url":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-12-05T05:21:29+00:00","article_modified_time":"2018-12-05T10:14:48+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Qlik Sense Visualization Expressions &#8211; Aggregation &amp; Modifiers","datePublished":"2018-12-05T05:21:29+00:00","dateModified":"2018-12-05T10:14:48+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/"},"wordCount":1691,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg","keywords":["Aggregation functions","Qlik Sense Visualization Expressions","Set Analysis","Set Expressions","Set Modifers","Visualization Expressions"],"articleSection":["Qlik Sense Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/","url":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/","name":"Qlik Sense Visualization Expressions - Aggregation &amp; Modifiers - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg","datePublished":"2018-12-05T05:21:29+00:00","dateModified":"2018-12-05T10:14:48+00:00","description":"Qlik Sense Visualization Expressions,Aggregation functions in Qlik Sense,Set analysis, Set Modifiers,Set expressions,how to modify expressions","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/12\/Qlik-Sense-Visualization-Expressions-01-1.jpg","width":1200,"height":628,"caption":"Qlik Sense Visualization Expressions - Aggregation &amp; Modifiers"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-visualization-expressions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Qlik Sense Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/qlik-sense-tutorials\/"},{"@type":"ListItem","position":3,"name":"Qlik Sense Visualization Expressions &#8211; Aggregation &amp; Modifiers"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/44275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=44275"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/44275\/revisions"}],"predecessor-version":[{"id":44448,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/44275\/revisions\/44448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/44289"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=44275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=44275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=44275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}