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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I'm relatively new to dax and i'm trying something more complicated but i fail 😞
I have the following data:
| Product | Available | Sold | |
| 1 | Product_1 | 10 | 9 |
| 2 | Product_1 | 66 | 0 |
| 3 | Product_1 | 45 | 38 |
| 4 | Product_2 | 48 | 0 |
| 5 | Product_2 | 41 | 0 |
| 6 | Product_3 | 54 | 29 |
| 7 | Product_3 | 45 | 27 |
| 8 | Product_3 | 17 | 0 |
| 9 | Product_3 | 15 | 9 |
What i would like to do is:
Check if there any value in column sold greater than zero.
If yes then sum all 'available' by product.
| Product | Available (sum) |
| Product_1 | 121 (10+66+45) |
| Product_2 | 0 or null |
| Product_3 | 131 (29 + 27 +10 +9) |
I tried the following
sumif =
var __table =
FILTER('data$',
[Sold] <> 0
)
return
sumx(__table,[Available])
but i only get the sum of the rows that are non zero (rows: 1, 3, 6, 7 and 9)
What i'm missing?
Thank you!
Grigoris
Solved! Go to Solution.
Thank you! Works great
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 20 | |
| 13 | |
| 12 |