• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Data Stories
    • Power BI Stories
    • 1 dataset, 100 matplotlib visualizations
  • Learning Portal
    • Download Center
    • 25 Days Challenge
    • DAX Glossary
    • Power BI
    • Power BI by Topic
    • Python
    • 1 dataset, 100 matplotlib visualizations
  • Courses
    • Power BI Mini Master Class 1: Using a REST API as a data source
    • Power BI Master Class 1: COVID Tracker
    • Introduction to Power BI – FREE Online course
    • M Language + Power Query Course Bundle
    • Power Query Online Training [updated 2022]
    • M Language Online Course: The unofficial and Practical Reference Guide [updated 2025]
    • My Courses
  • Shop
    • Courses
    • Master Classes
    • Template Apps
    • JSON Themes
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Search
  • Contact
You are here: Home / CM Tooltip Glossary Pro+ / CURRENTGROUP

CURRENTGROUP

posted on April 13, 2018

« Back to Glossary Index

Syntax

GROUPBY (<table>, [<groupBy_columnName1>], [<name>, <expression>]… ) 

Tutorial with example

In today’s DAX Fridays, we will go through the DAX function GROUPBY with an example.

GROUPBY is similar as SUMMARIZE, but the difference is that in the expression part, you use DAX iterators to get your results.
You can also nest GROUPBY functions to get for example the highest sales amount by country.

DAX Fridays! #77: GROUPBY, CURRENTGROUP

Links to the mentioned resources

To get the files:
1. Go to Curbal Download Center > Dax Fridays
2. Get File #77

Remarks

  • The GROUPBY function does the following:
    1. Start with the specified table (and all related tables in the “to-one” direction).
    2. Create a grouping using all of the GroupBy columns (which are required to exist in the table from step #1.).
    3. Each group is one row in the result, but represents a set of rows in the original table.
    4. For each group, evaluate the extension columns being added. Unlike the SUMMARIZE function, an implied CALCULATE is not performed, and the group isn’t placed into the filter context.

    Notes:

    • Each column for which you define a name must have a corresponding expression; otherwise, an error is returned. The first argument, name, defines the name of the column in the results. The second argument, expression, defines the calculation performed to obtain the value for each row in that column.
    • groupBy_columnName must be either in table or in a related table.
    • Each name must be enclosed in double quotation marks.
    • The function groups a selected set of rows into a set of summary rows by the values of one or more groupBy_columnName columns. One row is returned for each group.
Was this helpful?
« Back to Index

Reader Interactions

Comments

  1. jmeadows

    October 26, 2018 at 1:21 pm

    Hi Ruth, a great summary thank you. I cannot see the download file on the download centre, can you direct me to it please?

    Reply
    • Ruth Pozuelo Martinez

      October 26, 2018 at 1:46 pm

      Hi!
      Unfortunately, if the file is not available there, it means that I lost it or deleted it , so I don’t have it anymore.
      Sorry about that!
      /Ruth

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer CTA

Join our community of +50,000 professionals

Become a Member

Subscribe to YouTube

About me:

Curbal AB
Badhusgatan 7B
722 15 – Västerås
Sweden

OrgNo: 5569680852 | VAT: SE556968085201

 

Location:

© Copyright 2014-2025 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In