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.
Hello!
I hope you could help me with this DAX formula that will be used.
I want to get to sum up all Name with negative amount in Amt Diff (Rev-Cost).
Do you know what DAX formula to use?
Thanks
Solved! Go to Solution.
Hi @juhoneyighot ,
I create a table as you mentioned.
Then I put it into the matrix visual.
Next I create a measure and get what you want.
Measure =
VAR _RevCost =
SUM ( 'Table'[Rev] ) - SUM ( 'Table'[Cost] )
RETURN
IF ( _RevCost < 0, ( SELECTEDVALUE ( 'Table'[Name] ) ), _RevCost )
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi All,
Even I am facing similar issue , my data contains both negative and positive values in column 'Revenue', however when i use the same column in my Table visual the negative values are neglected and the table shows only the positive values. I checked that this might be due to the summarization i am doing on the column to get the grand total. How do we handle this, do we have to do any kind of special formatting, etc?
Hi @juhoneyighot ,
I create a table as you mentioned.
Then I put it into the matrix visual.
Next I create a measure and get what you want.
Measure =
VAR _RevCost =
SUM ( 'Table'[Rev] ) - SUM ( 'Table'[Cost] )
RETURN
IF ( _RevCost < 0, ( SELECTEDVALUE ( 'Table'[Name] ) ), _RevCost )
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this measure:
Sum of Negative Amount =
VAR vTable =
ADDCOLUMNS ( VALUES ( 'Table'[Name] ), "@AmtDiff", [Amt Diff (Rev-Cost)] )
VAR vResult =
SUMX ( FILTER ( vTable, [@AmtDiff] < 0 ), [@AmtDiff] )
RETURN
vResult
Proud to be a Super User!
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 |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |