Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I have below sample data and need a measure to calculate a sum of each unique package label based on the individual package IDs:
| Package Label | Package ID | Line Item Cost | 
| 45557 | 1110 | $995.95 | 
| 45557 | 1118 | $493.00 | 
| 45557 | 1119 | $948.05 | 
I need an outcome like this:
| Package Label | Package ID | Line Item Cost | Total Package Cost | 
| 45557 | 1110 | $995.95 | $2,437.00 | 
| 45557 | 1118 | $493.00 | $2,437.00 | 
| 45557 | 1119 | $948.05 | $2,437.00 | 
I have tried the below in DAX, but the measure just returns the line item cost again:
Unique Package Label Costs = SUMX(VALUES('table'[package label]),CALCULATE(SUM('table'[line item cost])))
Unique Package Lable Costs = SUMX(DISTINCT('table'[package label]),CALCULATE(SUM('table'[line item cost])))
Thanks,
Alex
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
Total package cost: =
CALCULATE (
    SUM ( 'table'[Line Item Cost] ),
    ALLEXCEPT ( 'table', 'table'[Package Label] )
)
Hi,
Please check the below picture and the attached pbix file.
Total package cost: =
CALCULATE (
    SUM ( 'table'[Line Item Cost] ),
    ALLEXCEPT ( 'table', 'table'[Package Label] )
)
This worked. Thank you!
Hi @ktbam_7
please try below
This worked as well! Thank you.
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |