{"id":89,"date":"2026-02-26T05:00:30","date_gmt":"2026-02-26T05:00:30","guid":{"rendered":"https:\/\/gigz.pk\/powerbi\/?post_type=lesson&#038;p=89"},"modified":"2026-03-17T05:40:20","modified_gmt":"2026-03-17T05:40:20","slug":"aggregation-functions-sum-count-average","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/powerbi\/lesson\/aggregation-functions-sum-count-average\/","title":{"rendered":"Aggregation Functions (SUM, COUNT, AVERAGE)"},"content":{"rendered":"\n<p>Aggregation functions in Power BI (using DAX) are used to summarize data. They help you calculate totals, counts, and averages from large datasets, making reports easier to analyze and understand.<\/p>\n\n\n\n<p>These functions are commonly used inside Measures to create dynamic calculations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SUM Function<\/h2>\n\n\n\n<p>The SUM function adds all the values in a numeric column.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Syntax<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">SUM(Table[Column])<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">Total Sales = SUM(Sales[Amount])<\/pre>\n\n\n\n<p>This measure calculates the total of all values in the Amount column of the Sales table.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">When to Use SUM<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To calculate total revenue<\/li>\n\n\n\n<li>To calculate total quantity sold<\/li>\n\n\n\n<li>To get total expenses or costs<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">COUNT Function<\/h2>\n\n\n\n<p>The COUNT function counts the number of non-blank values in a column.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Syntax<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">COUNT(Table[Column])<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">Total Orders = COUNT(Sales[OrderID])<\/pre>\n\n\n\n<p>This measure counts how many non-empty OrderID values exist in the Sales table.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related Functions<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>COUNTA \u2013 Counts non-blank values (including text)<\/li>\n\n\n\n<li>COUNTROWS \u2013 Counts the total number of rows in a table<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Total Rows = COUNTROWS(Sales)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">AVERAGE Function<\/h2>\n\n\n\n<p>The AVERAGE function calculates the average (mean) of a numeric column.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Syntax<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">AVERAGE(Table[Column])<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">Average Sales = AVERAGE(Sales[Amount])<\/pre>\n\n\n\n<p>This measure calculates the average sales amount.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">When to Use AVERAGE<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To calculate average revenue per order<\/li>\n\n\n\n<li>To find average salary<\/li>\n\n\n\n<li>To measure average performance metrics<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Important Concept: Filter Context<\/h2>\n\n\n\n<p>All aggregation functions in Measures respond to filter context. This means results will change automatically when you apply slicers, filters, or use different visuals in your report.<\/p>\n\n\n\n<p>For example, Total Sales will show different values when filtered by year, region, or product.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>SUM, COUNT, and AVERAGE are basic but powerful aggregation functions in DAX. They form the foundation of most business reports and dashboards. Mastering these functions is essential for creating meaningful and dynamic Power BI reports.<\/p>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1773726192183\"><strong class=\"schema-faq-question\"><\/strong> <p class=\"schema-faq-answer\"><\/p> <\/div> <\/div>\n\n\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/gigz.pk\/powerbi\/\">Home<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\">Power BI DAX Mastery > DAX Fundamentals > Aggregation Functions (SUM, COUNT, AVERAGE)<\/span><\/span><\/div>","protected":false},"menu_order":26,"template":"","class_list":["post-89","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Aggregation Functions (SUM, COUNT, AVERAGE) - Power BI Learning Hub<\/title>\n<meta name=\"description\" content=\"Master DAX aggregation functions in Power BI: SUM, COUNT, and AVERAGE explained with examples for dynamic business reports.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Aggregation Functions (SUM, COUNT, AVERAGE) - Power BI Learning Hub\" \/>\n<meta property=\"og:description\" content=\"Master DAX aggregation functions in Power BI: SUM, COUNT, and AVERAGE explained with examples for dynamic business reports.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/\" \/>\n<meta property=\"og:site_name\" content=\"Power BI Learning Hub\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-17T05:40:20+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/gigz.pk\\\/powerbi\\\/lesson\\\/aggregation-functions-sum-count-average\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/\",\"name\":\"Aggregation Functions (SUM, COUNT, AVERAGE) - Power BI Learning Hub\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/powerbi\\\/#website\"},\"datePublished\":\"2026-02-26T05:00:30+00:00\",\"dateModified\":\"2026-03-17T05:40:20+00:00\",\"description\":\"Master DAX aggregation functions in Power BI: SUM, COUNT, and AVERAGE explained with examples for dynamic business reports.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/powerbi\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Power BI DAX Mastery > DAX Fundamentals > Aggregation Functions (SUM, COUNT, AVERAGE)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/powerbi\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/powerbi\\\/\",\"name\":\"Power BI Learning Hub\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/powerbi\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Aggregation Functions (SUM, COUNT, AVERAGE) - Power BI Learning Hub","description":"Master DAX aggregation functions in Power BI: SUM, COUNT, and AVERAGE explained with examples for dynamic business reports.","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:\/\/gigz.pk\/","og_locale":"en_US","og_type":"article","og_title":"Aggregation Functions (SUM, COUNT, AVERAGE) - Power BI Learning Hub","og_description":"Master DAX aggregation functions in Power BI: SUM, COUNT, and AVERAGE explained with examples for dynamic business reports.","og_url":"https:\/\/gigz.pk\/","og_site_name":"Power BI Learning Hub","article_modified_time":"2026-03-17T05:40:20+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["WebPage","FAQPage"],"@id":"https:\/\/gigz.pk\/powerbi\/lesson\/aggregation-functions-sum-count-average\/","url":"https:\/\/gigz.pk\/","name":"Aggregation Functions (SUM, COUNT, AVERAGE) - Power BI Learning Hub","isPartOf":{"@id":"https:\/\/gigz.pk\/powerbi\/#website"},"datePublished":"2026-02-26T05:00:30+00:00","dateModified":"2026-03-17T05:40:20+00:00","description":"Master DAX aggregation functions in Power BI: SUM, COUNT, and AVERAGE explained with examples for dynamic business reports.","breadcrumb":{"@id":"https:\/\/gigz.pk\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/powerbi\/"},{"@type":"ListItem","position":2,"name":"Power BI DAX Mastery > DAX Fundamentals > Aggregation Functions (SUM, COUNT, AVERAGE)"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/powerbi\/#website","url":"https:\/\/gigz.pk\/powerbi\/","name":"Power BI Learning Hub","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/powerbi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/powerbi\/wp-json\/wp\/v2\/lesson\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/powerbi\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/powerbi\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/powerbi\/wp-json\/wp\/v2\/media?parent=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}