Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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,
I need help with the creation of summation specific column using DAX.
I could not think of adding quantity for a specific column; and the cost column should be the same. (sample table below)
I did the "sum" in the column item quantity, but it also sums up the item cost column. So, I put it back to "Don't summarize."
scenario:
| Problem: | ||||
| Warehouse No. | Item | Warehouse Location | Item Quantity | Item Cost |
| A100 | Wheel | Orange | 0 | 200.75 |
| B200 | Handle | Red | 0 | 200.75 |
| B200 | Handle | Pink | 1 | 200.75 |
| B200 | Handle | Blue | 1 | 200.75 |
| B200 | Handle | Blue | 6 | 200.75 |
Expected output in the report should be:
| Warehouse No. | Item | Warehouse Location | Item Quantity | Item Cost |
| A100 | Wheel | Orange | 0 | 200.75 |
| B200 | Handle | Red | 0 | 200.75 |
| B200 | Handle | Pink | 1 | 200.75 |
| B200 | Handle | Blue | 7 | 200.75 |
Appreciate anyone's help.
Thank you
Solved! Go to Solution.
Hi @francesg
You summarze "Item Quantity" by sum and summarize "Item Cost" by max or min
Hi @tamerj1
i tried this measure,
SubTotal ItemQty = MAX('Table_Inventory'[ItemCost], SUM('Table_Inventory'[ItemQty]))
but i get an error:
"A single value for column 'ItemCost' in the table 'Table_Inventory' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count..... "
Appreciate your help
Hi@tamerj1
Woow it got what i expected output. (i got myself too complicated for the solution) 😀
Thanks so much.
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 |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |