

{"id":38843,"date":"2018-11-10T12:12:05","date_gmt":"2018-11-10T06:42:05","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=38843"},"modified":"2021-12-07T11:20:25","modified_gmt":"2021-12-07T05:50:25","slug":"qlikview-aggregate-function-aggr","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/","title":{"rendered":"QlikView Aggregate Function &#8211; 6 Types of AGGR() Function"},"content":{"rendered":"<p align=\"justify\"><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">One of the very useful functions amongst the long list of functions that we saw in the previous tutorial is QlikView Agg() Function category. In this QlikView Aggregate Function, we are going to gain a better understanding of aggregate functions and also learn to apply these functions to our data. <\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">Along with this, we will learn different types of Aggregate <a href=\"https:\/\/data-flair.training\/blogs\/qlikview-functions\/\"><strong>Function in QlikView<\/strong><\/a> with their subtypes and examples.<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">So, Let&#8217;s start QlikViewAggregate Function.<\/span><\/span><\/p>\n<div id=\"attachment_38863\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-38863\" class=\"size-full wp-image-38863\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.jpg\" alt=\"QlikView Aggregate Function - 6 Types of AGGR() Function\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-38863\" class=\"wp-caption-text\">QlikView Aggregate Function &#8211; 6 Types of AGGR() Function<\/p><\/div>\n<h3 align=\"justify\">What is QlikView Aggregate Function?<\/h3>\n<p align=\"justify\"><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">QlikView Aggregate function is provided to aggregate or bundle your data from the rows in the table. You can apply mathematical or statistical operations collectively on large data loads. There are sub-categories or types of QlikView aggregate function each based on the action they perform on the data. <\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">You can apply these functions to the table fields while loading your data files in the qlikview script editor. A <\/span><\/span><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\"><b>Group By<\/b><\/span><\/span><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\"> clause is very essential to add while incorporating the QlikView aggregate function in the load statement. This clause specifies the field in the table of which you want the data to aggregate.<\/span><\/span><\/p>\n<p align=\"justify\"><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-bookmarks\/\">Do you know How to Create, Import, Remove QlikView Bookmarks?<\/a><\/strong><\/p>\n<h3 align=\"justify\">Types of Aggregate Function in QlikView<\/h3>\n<p align=\"justify\"><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">There are seven different sub-categories of QlikView aggregate function. Here we will study some function sub-category with the function they perform and examples in details.<\/span><\/span><\/p>\n<h4 align=\"justify\">i. Basic Aggregation Functions<\/h4>\n<p><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">We will use a reference data record of Product details and apply the QlikView aggregate function on it.<\/span><\/span><\/p>\n<div id=\"attachment_38853\" style=\"width: 773px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/data.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-38853\" class=\"wp-image-38853 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/data.png\" alt=\"QlikView Aggregate Function - AGGR() Function\" width=\"763\" height=\"527\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/data.png 763w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/data-150x104.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/data-300x207.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/data-520x359.png 520w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \/><\/a><p id=\"caption-attachment-38853\" class=\"wp-caption-text\">QlikView Aggregate Function &#8211; Basic Aggregation Functions<\/p><\/div>\n<h5>a. sum([distinct]expression)<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the sum of a number of records of the field defined by a <\/span><span style=\"font-family: Verdana, serif\"><b>group by <\/b><\/span><span style=\"font-family: Verdana, serif\">clause. If the word <\/span><span style=\"font-family: Verdana, serif\"><b>distinct <\/b><\/span><span style=\"font-family: Verdana, serif\">occurs before the expression, all duplicates will be disregarded.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Productrecords:\r\nLOAD Product_Id,\r\n     Product_Line,\r\n     Product_category,\r\n     Product_quantity,\r\n     Product_cost\r\nFROM\r\n[C:\\Users\\admin\\Desktop\\Dataflair\\productrecord.csv]\r\n(txt, codepage is 1252, embedded labels, delimiter is ',', msq);\r\n\r\nTotal:\r\nLOAD\r\n    Product_Line, sum(Product_quantity) as [Totalquantity],\r\n                  sum(Product_cost) as [Totalcost]\r\n     Resident Productrecords Group by Product_Line;\r\n     Drop table Productrecords;<\/pre>\n<p><div id=\"attachment_38855\" style=\"width: 317px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-38855\" class=\"wp-image-38855 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr3.png\" alt=\"QlikView Aggregate Function - AGGR() Function\" width=\"307\" height=\"257\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr3.png 307w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr3-150x126.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr3-300x251.png 300w\" sizes=\"auto, (max-width: 307px) 100vw, 307px\" \/><\/a><p id=\"caption-attachment-38855\" class=\"wp-caption-text\">QlikView Aggregate Function &#8211; sum([distinct]expression)<\/p><\/div><span style=\"font-family: Verdana, serif\">Here, we have added product quantity and cost on the basis of the Product line. You can notice it in the output table with total quantity and total cost.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-operators\/\">Let&#8217;e Explore different types of QlikView Operators with examples<\/a><\/strong><\/p>\n<h5>b. min( expression, rank )<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the minimum numeric value amongst the whole set of records as defined by a <\/span><span style=\"font-family: Verdana, serif\"><b>group by <\/b><\/span><span style=\"font-family: Verdana, serif\">clause. Rank defaults to 1 which corresponds to the lowest value. By specifying rank as 2 the second lowest value will be returned and so on.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Examples:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Load Product_Line, min(Product_quantity) as minquantity from productrecords.csv group by<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Product_Line;<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Load Product_Line, min(Product_quantity, 2) as Secondminquantity from productrecords.csv<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>group by Product_Line;<\/i><\/span><\/p>\n<h5>c. max(expression, rank)<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the maximum numeric value encountered over a number of records. Rank defaults to 1 which corresponds to the highest value. By specifying rank as 2 the second highest value will be returned and so on.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Examples:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Load Product_Line, max(Product_quantity) as maxquantity<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>from productrecords.csv group by<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Product_Line;<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Load Product_Line, max(Product_quantity, 2) as Secondmaxquantity <\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>from productrecords.csv<\/i><\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Productrecords:\r\nLOAD Product_Id,\r\n     Product_Line,\r\n     Product_category,\r\n     Product_quantity,\r\n     Product_cost\r\nFROM\r\n[C:\\Users\\admin\\Desktop\\Dataflair\\productrecords.csv]\r\n(txt, codepage is 1252, embedded labels, delimiter is ',', msq);\r\n\r\nTotal\r\nLOAD\r\n    Product_Line,\r\n    min(Product_quantity) as minquantity,\r\n    max(Product_quantity) as maxquantity\r\n    Resident Productrecords Group by Product_line;\r\n    Drop table productrecords;<\/pre>\n<div id=\"attachment_38857\" style=\"width: 321px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr5.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-38857\" class=\"wp-image-38857 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr5.png\" alt=\"QlikView Aggregate Function - AGGR() Function\" width=\"311\" height=\"163\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr5.png 311w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr5-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr5-300x157.png 300w\" sizes=\"auto, (max-width: 311px) 100vw, 311px\" \/><\/a><p id=\"caption-attachment-38857\" class=\"wp-caption-text\">QlikView Aggregate Function &#8211; max(expression, rank)<\/p><\/div>\n<h5><span style=\"font-family: Verdana, serif\">d. only(expression )<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">If an expression contains only one numeric value, that value is returned. Else, NULL is returned.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, only(Price) as OnlyPriceSoldFor from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Month;<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-script-statements-keywords\/\">Also, Read\u00a0QlikView Script Statements and Keywords<\/a><\/strong><\/p>\n<h5><span style=\"font-family: Verdana, serif\">e. mode(expression )<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the mode value, i.e. the most commonly occurring value, of expression over a number of records. If more than one value is equally commonly occurring, NULL is returned.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Mode <\/b><\/span><span style=\"font-family: Verdana, serif\">can return numeric values as well as text values.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Examples:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, mode( ErrorNumber ) as MostCommonErrorNumber from abc.csv<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">group by Month;<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, mode( Product ) as ProductMostOftenSold from abc.csv group<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">by Month;<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">f. firstsortedvalue (expression, sort-weight, n)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the first value of expression sorted by the corresponding sort-weight when an expression is iterated over a number of records. Sort-weight should return a numeric value where the lowest value will render the corresponding value of the expression to be sorted first. By preceding the sort-value expression with a minus sign, the function will return the last value instead. <\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">If more than one value of expression share the same lowest sort-order, the function will return NULL. By stating an n larger than 1, the nth value in order will be returned. If the word <\/span><span style=\"font-family: Verdana, serif\"><b>distinct <\/b><\/span><span style=\"font-family: Verdana, serif\">occurs before the expression, all duplicates will be disregarded.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Product_Line,<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Firstsortedvalue (Product_category, Product_quantity) as MostBoughtProduct<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">from Productrecords.csv group by Product_Line;<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Returns the value of the MostBoughtProduct-87- Power Equipment<\/span><\/p>\n<h4>ii. String Aggregate Functions<\/h4>\n<p>This is the second type of QlikView Aggregate Function, let&#8217;s see its sub catagory:<\/p>\n<h5><span style=\"font-family: Verdana, serif\">a. MinString(expression)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the first text value from records. If no text value is found, NULL is returned.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, MinString(Month) as FirstSalesMonth from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Year;<\/span><\/p>\n<h5>b. MaxString(expression )<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the last text value from records. If no text value is found, NULL is returned.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, MaxString(Month) as LastSalesMonth from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Year;<\/span><\/p>\n<h5>c. FirstValue(expression)<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the first value in load order. If no text value is found, NULL is returned. This function is only available as a script function.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load City, FirstValue(Name), as FirstName from abc.csv group by City;<\/span><\/p>\n<h5>d. LastValue(expression)<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the last value in load order.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load City, LastValue(Name), as FirstName from abc.csv group by City;<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-themes-in-layout\/\">Do you know How to Apply QlikView Layout Themes?<\/a><\/strong><\/p>\n<h5>e. concat (expression , delimiter , sort-weight)<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the aggregated string concatenation of all values of expression iterated through data. Each value may be separated by the string found in delimiter. The order of concatenation may be determined by sort-weight. Sort-weight should return a numeric value where the lowest value will render the item to be sorted first.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Department, concat(Name,&#8217;;&#8217;) as NameList from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Department;<\/span><\/p>\n<h4>iii. Counter Aggregation Functions<\/h4>\n<h5><span style=\"font-family: Verdana, serif\">a. count([distinct ] expression | *)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the count of expression over a number of records.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Examples:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Load Product_Line, count(Product_cost) as TotalSalesPerMonth from Productrecords.csv<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Group by Product_Line;<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Returns the total count of sales in a month.\u00a0<\/span><\/p>\n<h5>b. NumericCount(expression)<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the numeric count.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><i>Load Month, NumericCount(products) as Totalproducts from products.csv<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">group by Month;<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Result will be total number of products sold in the data record.\u00a0<\/span><\/p>\n<h5>c. TextCount(expression)<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the text count .<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, TextCount(Item) as NumberOfTextItems from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Month;\u00a0<\/span><\/p>\n<h5>d. NullCount(expression )<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the NULL count of expression.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, NullCount(Item) as NumberOfNullItems from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Month;\u00a0<\/span><\/p>\n<h5>e. MissingCount(expression )<\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the missing count.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, MissingCount(Item) as NumberOfMissingItems from abc.csv<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">group by Month;\u00a0<\/span><\/p>\n<h5>f. Advanced Aggregation<\/h5>\n<p><span style=\"font-family: Verdana, serif\"><b>aggr (<\/b><\/span><span style=\"font-family: Verdana, serif\"><i>[ <\/i><\/span><span style=\"font-family: Verdana, serif\"><i><b>distinct <\/b><\/i><\/span><span style=\"font-family: Verdana, serif\"><i>| <\/i><\/span><span style=\"font-family: Verdana, serif\"><i><b>nodistinct <\/b><\/i><\/span><span style=\"font-family: Verdana, serif\"><i>] [set_expression]expression {dimension}<\/i><\/span><span style=\"font-family: Verdana, serif\"><b>)<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Returns a set of values of <\/span><span style=\"font-family: Verdana, serif\"><i>expression <\/i><\/span><span style=\"font-family: Verdana, serif\">calculated over <\/span><span style=\"font-family: Verdana, serif\"><i>dimensions<\/i><\/span><span style=\"font-family: Verdana, serif\">. The result can be compared to the expression column of a &#8216;local chart&#8217;, evaluated in the context where the <\/span><span style=\"font-family: Verdana, serif\"><b>aggr <\/b><\/span><span style=\"font-family: Verdana, serif\">function resides. Each <\/span><span style=\"font-family: Verdana, serif\"><i>dimension <\/i><\/span><span style=\"font-family: Verdana, serif\">must be a single field. It cannot be an expression (calculated dimension). <\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">If the <\/span><span style=\"font-family: Verdana, serif\"><i>expression <\/i><\/span><span style=\"font-family: Verdana, serif\">argument is preceded by the <\/span><span style=\"font-family: Verdana, serif\"><b>nodistinct <\/b><\/span><span style=\"font-family: Verdana, serif\">qualifier, each combination of dimension values may generate more than one return value, depending on underlying data structure.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">If the <\/span><span style=\"font-family: Verdana, serif\"><i>expression <\/i><\/span><span style=\"font-family: Verdana, serif\">argument is preceded by the <\/span><span style=\"font-family: Verdana, serif\"><b>distinct <\/b><\/span><span style=\"font-family: Verdana, serif\">qualifier or if no qualifier is used at all, each combination of dimension values will generate only one return value.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">By default, the aggregation function will aggregate over the set of possible records defined by the selection. An alternative set of records can be defined by a <\/span><span style=\"font-family: Verdana, serif\"><i>Set Analysis <\/i><\/span><span style=\"font-family: Verdana, serif\">expression.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">By using this function in <\/span><span style=\"font-family: Verdana, serif\"><i>Add calculated dimension <\/i><\/span><span style=\"font-family: Verdana, serif\">it is possible to achieve nested chart aggregation in multiple levels.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Examples:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">In the screenshots attached below , we have loaded sales data inline and have applied aggr function to calculate the sum of total sales done by each salesman. We have done this in a chart sheet object.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">LOAD * INLINE [\r\n   Customer, Sales, Product, SalesPerson\r\n   A-Mart, 50000, \"Children's wear\", John\r\n   A-mart, 25000, \"Men's wear\", Beth\r\n   A-mart, 30000, \"Women's wear\", John\r\n   Vogue, 10000, \"Men's wear\", Mike\r\n   Vogue, 15000, \"Children's wear\", Susan\r\n   Vogue, 10000, \"Men's wear\", Susan\r\n   C-Mart, 40000, \"Children's wear\", Brad\r\n   C-Mart, 90000, \"Men's wear\", Dan\r\n   C-Mart, 60000, \"Women's wear\", Brad\r\n];<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"861\" height=\"559\" class=\"wp-image-38859 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr7.png\" alt=\"&quot;&lt;yoastmark\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr7.png 861w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr7-150x97.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr7-300x195.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr7-768x499.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr7-520x338.png 520w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/a><\/p>\n<div id=\"attachment_38860\" style=\"width: 311px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr8.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-38860\" class=\"wp-image-38860 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr8.png\" alt=\"QlikView Aggregate Function - AGGR() Function\" width=\"301\" height=\"235\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr8.png 301w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr8-150x117.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggr8-300x234.png 300w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/a><p id=\"caption-attachment-38860\" class=\"wp-caption-text\">Aggr Function &#8211; Advanced Aggregation<\/p><\/div>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-snmp-tutorial\/\">Have a look &#8211; QlikView Simple Network Management Protocol (SNMP)<\/a><\/strong><\/p>\n<h4>iv. Statistical Aggregation Functions<\/h4>\n<h5><span style=\"font-family: Verdana, serif\">a. fractile(<\/span><span style=\"font-family: Verdana, serif\"><i>expression, fractile<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the fractile of <\/span><span style=\"font-family: Verdana, serif\"><i>expression <\/i><\/span><span style=\"font-family: Verdana, serif\">.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Class, fractile( Grade, 0.75 ) as F from abc.csv group by Class;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">b. kurtosis(<\/span><span style=\"font-family: Verdana, serif\"><i>expression <\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the kurtosis of <\/span><span style=\"font-family: Verdana, serif\"><i>expression. Kurtosis measures the peak of a frequency distribution curve.<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, kurtosis(Sales) as SalesKurtosis from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Month;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">c. correl(<\/span><span style=\"font-family: Verdana, serif\"><i>x-expression, y-expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the aggregated correlation coefficient for a series of coordinates represented by paired numbers in x-expression and y-expression iterated over a number of records . Text values, null values and missing values in any or both pieces of a data-pair will result in the entire data-pair to be disregarded.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, correl(X,Y) as CC from abc.csv group by Month;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">d. avg(<\/span><span style=\"font-family: Verdana, serif\"><i>expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the average of <\/span><span style=\"font-family: Verdana, serif\"><i>expression.<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Productrecords:\r\nLOAD Product_Id,\r\n     Product_Line,\r\n     Product_category,\r\n     Product_quantity,\r\n     Product_cost\r\nFROM\r\n[C:\\Users\\admin\\Desktop\\Dataflair\\productrecord.csv]\r\n(txt, codepage is 1252, embedded labels, delimiter is ',', msq);\r\n\r\nTotal:\r\nLoad\r\n    Product_Line, avg(product_quantity),\r\n                  avg(product_cost)\r\n     Resident Productrecords Group by Product_Line;\r\n     Drop table productrecords;<\/pre>\n<div id=\"attachment_38862\" style=\"width: 428px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggravg2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-38862\" class=\"wp-image-38862 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggravg2.png\" alt=\"QlikView Aggregate Function - AGGR() Function\" width=\"418\" height=\"183\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggravg2.png 418w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggravg2-150x66.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/aggravg2-300x131.png 300w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/a><p id=\"caption-attachment-38862\" class=\"wp-caption-text\">QlikView Aggregate Function &#8211; avg(expression)<\/p><\/div>\n<h5><span style=\"font-family: Verdana, serif\">e. stdev(<\/span><span style=\"font-family: Verdana, serif\"><i>expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the standard deviation of <\/span><span style=\"font-family: Verdana, serif\"><i>expression.<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, stdev(Sales) as SalesStandardDeviation from abc.csv group<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">by Month;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">f. skew(<\/span><span style=\"font-family: Verdana, serif\"><i>expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the skewness of <\/span><span style=\"font-family: Verdana, serif\"><i>expression <\/i><\/span><span style=\"font-family: Verdana, serif\">.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Month, skew(Sales) as SalesSkew from abc.csv group by Month;\u00a0<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-trellis\/\">Do you know How to apply Trellis in Pie and Bar Charts in QlikView?<\/a><\/strong><\/p>\n<h5><span style=\"font-family: Verdana, serif\">g. median (<\/span><span style=\"font-family: Verdana, serif\"><i>expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the aggregated median of <\/span><span style=\"font-family: Verdana, serif\"><i>expression.<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Class, Median(Grade) as MG from abc.csv group by Class;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">h. linest_m (<\/span><span style=\"font-family: Verdana, serif\"><i>y-expression, x-expression [, y0 [, x0 ]]<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">returns the aggregated m value (slope) of a linear regression defined by the equation y=mx+b for a series of coordinates represented by paired numbers in <\/span><span style=\"font-family: Verdana, serif\"><i>x-expression <\/i><\/span><span style=\"font-family: Verdana, serif\">and <\/span><span style=\"font-family: Verdana, serif\"><i>y-expression <\/i><\/span><span style=\"font-family: Verdana, serif\">defined by a <\/span><span style=\"font-family: Verdana, serif\"><b>group by <\/b><\/span><span style=\"font-family: Verdana, serif\">clause.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">The function requires at least two valid data-pairs to calculate. If y<\/span><span style=\"font-family: Verdana, serif\"><i>0 <\/i><\/span><span style=\"font-family: Verdana, serif\">and x<\/span><span style=\"font-family: Verdana, serif\"><i>0 <\/i><\/span><span style=\"font-family: Verdana, serif\">are stated, a single data pair will do.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Key, linest_m(Y,X) as Z from abc.csv group by Key;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">i. linest_b (<\/span><span style=\"font-family: Verdana, serif\"><i>y-expression, x-expression [, y0 [, x0 ]]<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">returns the aggregated b value (y-intercept) of a linear regression defined by the equation y=mx+b for a series of coordinates represented by paired numbers in <\/span><span style=\"font-family: Verdana, serif\"><i>x-expression <\/i><\/span><span style=\"font-family: Verdana, serif\">and <\/span><span style=\"font-family: Verdana, serif\"><i>y-expression.<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">An optional value y<\/span><span style=\"font-family: Verdana, serif\"><i>0 <\/i><\/span><span style=\"font-family: Verdana, serif\">may be stated forcing the regression line to pass through the y-axis at a given point.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Key, linest_b(Y,X) as Z from abc.csv group by Key;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">j. linest_r2 (<\/span><span style=\"font-family: Verdana, serif\"><i>y-expression, x-expression [, y0 [, x0 ]]<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">returns the aggregated r2 value (coefficient of determination) of a linear regression defined by the equation y=mx+b for a series of coordinates represented by paired numbers in <\/span><span style=\"font-family: Verdana, serif\"><i>x-expression <\/i><\/span><span style=\"font-family: Verdana, serif\">and <\/span><span style=\"font-family: Verdana, serif\"><i>y-expression<\/i><\/span><span style=\"font-family: Verdana, serif\">.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Key, linest_r2(Y,X) as Z from abc.csv group by Key;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">k. linest_sem (<\/span><span style=\"font-family: Verdana, serif\"><i>y-expression, x-expression [, y0 [, x0 ]]<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">returns the aggregated standard error of the m value of a linear regression defined by the equation y=mx+b for a series of coordinates represented by paired numbers in <\/span><span style=\"font-family: Verdana, serif\"><i>x-expression <\/i><\/span><span style=\"font-family: Verdana, serif\">and <\/span><span style=\"font-family: Verdana, serif\"><i>y-expression <\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Key, linest_sem(Y,X) as Z from abc.csv group by Key;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">i. linest_seb (<\/span><span style=\"font-family: Verdana, serif\"><i>y-expression, x-expression [, y0 [, x0 ]]<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">returns the aggregated standard error of the b value of a linear regression defined by the equation y=mx+b for a series of coordinates represented by paired numbers in <\/span><span style=\"font-family: Verdana, serif\"><i>x-expression <\/i><\/span><span style=\"font-family: Verdana, serif\">and <\/span><span style=\"font-family: Verdana, serif\"><i>y-expression.<\/i><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Key, linest_seb(Y,X) as Z from abc.csv group by Key;<\/span><\/p>\n<h4>v. Financial Aggregate Function<\/h4>\n<p>This is the last QlikView Aggregate Function, let&#8217;s discuss its types:<\/p>\n<h5><span style=\"font-family: Verdana, serif\">a. irr(<\/span><span style=\"font-family: Verdana, serif\"><i>expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the aggregated internal rate of return for a series of cash flows represent by the numbers in expression iterated over a number of records as defined by a group by clause. These cash flows do not have to be even, as they would be for an annuity. <\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">However, the cash flows must occur at regular intervals, such as\u00a0<\/span><span style=\"font-family: Verdana, serif\">monthly or annually. The internal rate of return is the interest rate received for an investment consisting of payments (negative values) and income (positive values) that occur at regular periods. <\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">The function needs at least one positive and one negative value to calculate. Text values, null values and missing values disregard.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Year, irr(Payments) as IRate from abc.csv<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">group by Year;\u00a0<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-table\/\">Let&#8217;s Explore QlikView Tables &#8211; Cross, Straight, Pivot, Mapping Tables<\/a><\/strong><\/p>\n<h5><span style=\"font-family: Verdana, serif\">b. xirr (<\/span><span style=\"font-family: Verdana, serif\"><i>value expression, date expression <\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the aggregated internal rate of return for a schedule of cash flows (that is not necessarily periodic) represent by pair numbers in value expression and date expression iterated over a number of records as defined by a group by clause. All payments discount base on a 365-day year. Text values, null values\u00a0<\/span><span style=\"font-family: Verdana, serif\">and missing values in any or both pieces of a data-pair will result in the entire data-pair to be disregarded.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Year, xirr(Payments, PayDates) as Irate from abc.csv group by<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Year;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">c. npv (<\/span><span style=\"font-family: Verdana, serif\"><i>rate, expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the aggregated net present value of an investment based on a discount rate and a series of future payments (negative values) and incomes (positive values) represented by the numbers in expression iterated over a number of records as defined by a group by clause. <\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">The result has a default number format of money. The rate is the interest rate per period. The payments and incomes assume to occur at the end of each period. Text values, null values and missing values disregard.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Year, npv(0.05, Payments) as PValue from abc.csv group by Year;\u00a0<\/span><\/p>\n<h5><span style=\"font-family: Verdana, serif\">d. xnpv (<\/span><span style=\"font-family: Verdana, serif\"><i>rate, value expression, date expression<\/i><\/span><span style=\"font-family: Verdana, serif\">)<\/span><\/h5>\n<p><span style=\"font-family: Verdana, serif\">Returns the aggregated net present value for a schedule of cash flows (not necessarily periodic) represented by paired numbers in value expression and date expression iterated over a number of records as defined by a\u00a0<\/span><span style=\"font-family: Verdana, serif\">group by clause. A rate is the interest rate per period. <\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">The result has a default number format of money. All payments discount base on a 365-day year. Text values, null values and missing values in any or both pieces of a data-pair will result in the entire data-pair to disregard.<\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><b>Example:<\/b><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\">Load Year, npv(0.05, Payments, PayDates) as PValue from abc.csv group\u00a0<\/span><span style=\"font-family: Verdana, serif\">by Year.<\/span><\/p>\n<p>So, this was all about QlikView A<span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">ggregate Function. Hope you like our explanation<\/span><\/span><\/p>\n<h3>Conclusion<\/h3>\n<p align=\"justify\"><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">We have covered almost all of the QlikView aggregate function. As you must have noticed aggregate functions covers wide range of fields, from basic mathematical functions to statistical and financial. Practice and learn to use these functions by applying it on your data records.<\/span><\/span><\/p>\n<p><span style=\"font-family: Verdana, serif\"><span style=\"font-size: medium\">If you have any doubts regarding QlikView Aggregate Function or want to know about more functions, let us know in the comment section below.<\/span><\/span><\/p>\n<p>Related Topic &#8211;\u00a0\u00a0<strong><a href=\"https:\/\/data-flair.training\/blogs\/qlikview-publisher-repository-qvpr\/\">QlikView Publisher Repository (QVPR)<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/help.qlik.com\/en-US\/qlikview\/November2017\/Subsystems\/Client\/Content\/Scripting\/AggregationFunctions\/aggregation-functions.htm\">Reference<\/a><\/strong><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1736,&quot;href&quot;:&quot;https:\\\/\\\/help.qlik.com\\\/en-US\\\/qlikview\\\/November2017\\\/Subsystems\\\/Client\\\/Content\\\/Scripting\\\/AggregationFunctions\\\/aggregation-functions.htm&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20190627211254\\\/http:\\\/\\\/help.qlik.com:80\\\/en-US\\\/qlikview\\\/November2017\\\/Subsystems\\\/Client\\\/Content\\\/Scripting\\\/AggregationFunctions\\\/aggregation-functions.htm&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 21:33:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-13 00:23:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-17 09:25:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-23 11:06:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-09 04:31:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-13 02:31:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-16 10:45:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-29 17:32:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-02 13:26:00&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-17 19:29:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-25 10:28:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-10 14:27:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 07:49:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 22:00:43&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-18 08:29:46&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 08:29:46&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the very useful functions amongst the long list of functions that we saw in the previous tutorial is QlikView Agg() Function category. In this QlikView Aggregate Function, we are going to gain&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":38863,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[17375,17370,17372,17374,17377,17371,17369,17376,17373],"class_list":["post-38843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qlikview","tag-advanced-aggregation-functions","tag-aggregation-function","tag-basic-aggregation-functions","tag-counter-aggregation-functions","tag-financial-aggregation-functions","tag-qlikview-aggr-function","tag-qlikview-aggregate-function","tag-statistical-aggregation-functions","tag-string-aggregation-functions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>QlikView Aggregate Function - 6 Types of AGGR() Function - DataFlair<\/title>\n<meta name=\"description\" content=\"QlikView Aggregate Function - Types of AGGR() Functions in QlikView,Basic Aggr function,String,Counter,Advanced,Statistical,Financial Aggregation Functions\" \/>\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\/qlikview-aggregate-function-aggr\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QlikView Aggregate Function - 6 Types of AGGR() Function - DataFlair\" \/>\n<meta property=\"og:description\" content=\"QlikView Aggregate Function - Types of AGGR() Functions in QlikView,Basic Aggr function,String,Counter,Advanced,Statistical,Financial Aggregation Functions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/\" \/>\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-11-10T06:42:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-07T05:50:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.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=\"13 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"QlikView Aggregate Function - 6 Types of AGGR() Function - DataFlair","description":"QlikView Aggregate Function - Types of AGGR() Functions in QlikView,Basic Aggr function,String,Counter,Advanced,Statistical,Financial Aggregation Functions","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\/qlikview-aggregate-function-aggr\/","og_locale":"en_US","og_type":"article","og_title":"QlikView Aggregate Function - 6 Types of AGGR() Function - DataFlair","og_description":"QlikView Aggregate Function - Types of AGGR() Functions in QlikView,Basic Aggr function,String,Counter,Advanced,Statistical,Financial Aggregation Functions","og_url":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-11-10T06:42:05+00:00","article_modified_time":"2021-12-07T05:50:25+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.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":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"QlikView Aggregate Function &#8211; 6 Types of AGGR() Function","datePublished":"2018-11-10T06:42:05+00:00","dateModified":"2021-12-07T05:50:25+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/"},"wordCount":2432,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.jpg","keywords":["Advanced Aggregation Functions","Aggregation Function","Basic Aggregation Functions","Counter Aggregation Functions","Financial Aggregation Functions","QlikView Aggr () Function","QlikView Aggregate Function","Statistical Aggregation Functions","String Aggregation Functions"],"articleSection":["QlikView Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/","url":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/","name":"QlikView Aggregate Function - 6 Types of AGGR() Function - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.jpg","datePublished":"2018-11-10T06:42:05+00:00","dateModified":"2021-12-07T05:50:25+00:00","description":"QlikView Aggregate Function - Types of AGGR() Functions in QlikView,Basic Aggr function,String,Counter,Advanced,Statistical,Financial Aggregation Functions","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/10\/QlikView-Aggregate-functions-01.jpg","width":1200,"height":628,"caption":"QlikView Aggregate Function - 6 Types of AGGR() Function"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/qlikview-aggregate-function-aggr\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"QlikView Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/qlikview\/"},{"@type":"ListItem","position":3,"name":"QlikView Aggregate Function &#8211; 6 Types of AGGR() Function"}]},{"@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\/38843","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=38843"}],"version-history":[{"count":12,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/38843\/revisions"}],"predecessor-version":[{"id":104965,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/38843\/revisions\/104965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/38863"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=38843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=38843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=38843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}