Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
How do I group my data? Let's say for example, I have data with these columns: managers, months, and sales. I want the total sales per month per manager. How would I write this in DAX?
Solved! Go to Solution.
Hi @mumair,
You can create a new table using SUMMARIZE function by New Table under Modeling on home page->type the following formula.
Group-by-table=SUMMARIZE(Table,Table[Month], Table[Managers],"Total Sales", sum(Table[sale]))
You also can create a new calculated column using the formula.
Total-sales-column = CALCULATE(SUM(Table[sales]),ALLEXCEPT(Table,Table[Month],Table[Managersr]))
Thanks,
Angelia
You may not need dax. Try experimenting with a Table visual or a Matrix visual - drag the fields into the appropriate design wells in the design pane - - and for this type of data PBI is going to recognize that grouping & aggregation.
If you already know this - and know you need/want to model it with calculated measure/columns - provide just a few line/record samples of your raw data table as a starting point...
Yes, I need to use DAX. The example I provided was to assist me in my actual dataset which is much larger. I cannot share the real data because it is properitary.
Hi @mumair,
You can create a new table using SUMMARIZE function by New Table under Modeling on home page->type the following formula.
Group-by-table=SUMMARIZE(Table,Table[Month], Table[Managers],"Total Sales", sum(Table[sale]))
You also can create a new calculated column using the formula.
Total-sales-column = CALCULATE(SUM(Table[sales]),ALLEXCEPT(Table,Table[Month],Table[Managersr]))
Thanks,
Angelia
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 42 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 113 | |
| 108 | |
| 38 | |
| 35 | |
| 26 |