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!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.
Hi there,
I'm a total newbie in DAX and struggling with this dataset:
Categories | Subcategories | Value | Total category value [desired] |
Cat A | Subcat 1 | 10 | 50 |
Cat A | Subcat 1 | 10 | 50 |
Cat A | Subcat 2 | 40 | 50 |
Cat B | Subcat 3 | 20 | 70 |
Cat B | Subcat 3 | 20 | 70 |
Cat A | Subcat 2 | 40 | 50 |
Cat B | Subcat 4 | 50 | 70 |
I have to create Total category value as a calculated column which contains the aggregated value of unique subcategories by category. For example 'Cat A' has two subcategories (Subcat 1 and 2) with multiple rows. 'Total category value' should be 10+40=50.
Thank you for your help!
Solved! Go to Solution.
Hi @ipeto
Total Category Value =
CALCULATE (
SUMX (
SUMMARIZE (
'Table',
'Table'[Categories],
'Table'[Subcategories]
),
CALCULATE ( MAX ( 'Table'[Value] ) )
),
ALLEXCEPT ( 'Table', 'Table'[Categories] )
)
Hi @ipeto
Total Category Value =
CALCULATE (
SUMX (
SUMMARIZE (
'Table',
'Table'[Categories],
'Table'[Subcategories]
),
CALCULATE ( MAX ( 'Table'[Value] ) )
),
ALLEXCEPT ( 'Table', 'Table'[Categories] )
)
Thank you for the superfast answer!
I have found parts of the solution, but I was unable to put them together.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |