agentsclimarketplace

Dax calculated column for group sum ignoring columns

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/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.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill dax-calculated-column-for-group-sum-ignoring-columns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 299 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.