AutoSkill 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.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/dax-calculated-column-for-group-sum-ignoring-columns" ~/.claude/skills/ecnu-icalk-autoskill-dax-calculated-column-for-group-sum-ignoring-columns && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/dax-calculated-column-for-group-sum-ignoring-columns/SKILL.mdsource content
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
- The solution must be a DAX calculated column, not a measure.
- Use the
function combined withCALCULATE
to modify the filter context.ALLEXCEPT - The
function should remove filters from all columns except the specified grouping columns.ALLEXCEPT - The resulting value should be identical for all rows that share the same values in the grouping columns.
- Do not use
orEARLIER
with row context comparisons unless explicitly requested, asFILTER
+CALCULATE
is the standard pattern for this requirement.ALLEXCEPT - 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