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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi all,
Can you please help me to calculate sum of negative amounts only?
Given three tables.
Table 1 is used to bill a customer and has Project, Item, Product type and Amount columns.
Table 2 is actual costs and has Project, Product type and Amount Colums
Table 3 has data with Project and Supervisor name
All three tables have relationship by Project
Now having those relationships I created a visual table that has 5 columns: 1. Supervisor, 2. Project,
3. "Project type amount calculated using data from Table 1",
4. "Project type amount calculated using data from Table 2" ,
5. Difference between column 3 & 4
Now I need to create another visual table that will show Supervisor name and sum of negative amounts only from column 5 in the visual described above.
I've used this formula
I have sample bi file that i can share with you, if you'd like to have a look at it.
Thank you very much everyone in advance!
Solved! Go to Solution.
Hi @Anonymous
I assume Supervisor and Project in the visual are both from table3. If so you may try
Fruit negative =
SUMX (
SUMMARIZE ( 'Table 3', 'Table 3'[Supervisor], 'Table 3'[Project] ),
CALCULATE ( IF ( [Diff fruit] < 0, [Diff fruit], BLANK () ) )
)
Hi @tamerj1 ,
Thank you very much, it worked perfectly! Would you recommend any articles or courses to understand how exactly those functions work? Have a great day 🙂
Yes sure. Start with "The definitive guide to DAX"
Hi @Anonymous
I assume Supervisor and Project in the visual are both from table3. If so you may try
Fruit negative =
SUMX (
SUMMARIZE ( 'Table 3', 'Table 3'[Supervisor], 'Table 3'[Project] ),
CALCULATE ( IF ( [Diff fruit] < 0, [Diff fruit], BLANK () ) )
)
User | Count |
---|---|
24 | |
10 | |
9 | |
7 | |
4 |