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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
So I have a dataset that is full of positive and negative numbers ex:
| Bill Number | Charge |
| 1 | -10 |
| 1 | 20 |
| 2 | 8 |
| 2 | -9 |
| 2 | -3 |
I want to create a few measures that sum up the count and total for bills that are positive and negative.
So positive count = 1 Bill with a $10 charge
and negative count would = 1 Bill with -4 Charge
The problem is not counting bill 1 in the negatives just because it has one negative charge, since its total is positive.
My measure right now look like this:
Solved! Go to Solution.
Hi @Anonymous
The following measures are for your reference.
Sum of Bills = CALCULATE(SUM('Table'[Charge]), ALLEXCEPT('Table', 'Table'[Bill Number]))
Grouped = COUNTX(SUMMARIZE(FILTER('Table', [Sum of Bills] > 0), 'Table'[Bill Number]), [Bill Number])
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This works perfectly, thank you!
Hi @Anonymous
The following measures are for your reference.
Sum of Bills = CALCULATE(SUM('Table'[Charge]), ALLEXCEPT('Table', 'Table'[Bill Number]))
Grouped = COUNTX(SUMMARIZE(FILTER('Table', [Sum of Bills] > 0), 'Table'[Bill Number]), [Bill Number])
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
|---|---|
| 12 | |
| 9 | |
| 8 | |
| 5 | |
| 3 |
| User | Count |
|---|---|
| 28 | |
| 22 | |
| 20 | |
| 18 | |
| 12 |