This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi all,
I have somehow a tricky problem.
I want to create a measure which sums the negative values per Company and Account:
| Company | Account | Value |
| A | K100 | 10 |
| A | K100 | -10 |
| A | K200 | 20 |
| B | K100 | 20 |
| B | K100 | -30 |
| B | K200 | -40 |
| C | K100 | 10 |
| C | K200 | 20 |
| C | K200 | -30 |
So for the table above I would like to get the result of -60:
> -10 for Company B and Account K100
> -40 for Company B and Account K200
> -10 for Company C and Account K200
I am only able to sum all negative values with the result of -110....
Any chance that I can group within the measure by Company and Account?
Any help would be much appreciated.
Many thanks
Philip
Solved! Go to Solution.
Hi, please try with this measure:
SumNegatives =
SUMX (
SUMMARIZE (
Table1,
Table1[Company],
Table1[Account],
"SumValues", CALCULATE ( SUM ( Table1[Value] ) )
),
IF ( [SumValues] < 0, [SumValues], 0 )
)Regards
Victor
Lima - Peru
Hi, please try with this measure:
SumNegatives =
SUMX (
SUMMARIZE (
Table1,
Table1[Company],
Table1[Account],
"SumValues", CALCULATE ( SUM ( Table1[Value] ) )
),
IF ( [SumValues] < 0, [SumValues], 0 )
)Regards
Victor
Lima - Peru
Victor,
many thanks! You saved my day, thats it!
Best
Philip
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 61 | |
| 36 | |
| 29 | |
| 22 | |
| 22 |