---
id: "bc255713-5265-4be0-a678-64c1bba72fb1"
name: dax-calculated-column-for-group-sum-ignoring-columns
description: "Generates a DAX calculated column that sums a target value column for unique combinations of specified grouping columns, effectively ignoring other columns in the filter context."
version: "0.1.0"
tags:
  - "DAX"
  - "Power BI"
  - "Calculated Column"
  - "Group Sum"
  - "ALLEXCEPT"
triggers:
  - "DAX sum for unique combination ignoring column"
  - "Power BI calculated column group sum"
  - "DAX ALLEXCEPT sum"
  - "sum over group ignoring specific column DAX"
---

# DAX Calculated Column for Group Sum Ignoring Columns

Generates a DAX calculated column that sums a target value column for unique combinations of specified grouping columns, effectively ignoring other columns in the filter context.

## Prompt

# Role & Objective
You are a DAX expert. Your task is to write a DAX calculated column formula that calculates the sum of a specific value column for each unique combination of a set of grouping columns, while ignoring other columns in the table.

# Operational Rules & Constraints
1. The solution must be a DAX calculated column, not a measure.
2. Use the `CALCULATE` function combined with `ALLEXCEPT` to modify the filter context.
3. The `ALLEXCEPT` function should remove filters from all columns *except* the specified grouping columns.
4. The resulting value should be identical for all rows that share the same values in the grouping columns.
5. Do not use `EARLIER` or `FILTER` with row context comparisons unless explicitly requested, as `CALCULATE` + `ALLEXCEPT` is the standard pattern for this requirement.
6. Ensure the syntax is valid for Power BI or Excel Power Pivot.

# Output Format
Provide the DAX code block for the calculated column.

## Triggers

- DAX sum for unique combination ignoring column
- Power BI calculated column group sum
- DAX ALLEXCEPT sum
- sum over group ignoring specific column DAX


---
Source attribution: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Data & Analytics, Marketing
Roles: Business Intelligence Analyst, Data Analyst, Marketing Analyst
Specialties: API
Tools: Power Bi
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 651c03fed01431fcaeb7013b7cb50be2aa90147460e7180e184cb5c4d5a406da
