Create a summary number as calculation aggregate sum expense minus aggregate sum reimbursements
Hello,
I am trying to create a beast mode calculation to show balance remaining after (sum of all expenditure)  (sum of all reimbursements).
here is my current calculation.
(case when `Expense Type` = 'Expenditure' then sum(`Account Balance`) else 0 end)

(case when `Expense Type` = 'Reimbursement' then sum(`Account Balance`) else 0 end)
The result I get is a sum of all (expenditure + reimbursements) rather than the intended (sum of all expenditures)  (sum of all reimbursements).
Thanks in advance for help.
Answers

You want to put your sum() around your case statement:
sum(case when `Expense Type` = 'Expenditure' then `Account Balance` else 0 end)

sum(case when `Expense Type` = 'Reimbursement' then `Account Balance` else 0 end)
2 
That actually worked. Thanks.
1
Categories
 11K All Categories
 5 Private Company Board
 2 APAC User Group
 12 Welcome
 42 Domo News
 9.9K Using Domo
 2K Dataflows
 2.5K Card Building
 2.2K Ideas Exchange
 1.2K Connectors
 349 Workbench
 267 Domo Best Practices
 11 Domo Certification
 474 Domo Developer
 51 Domo Everywhere
 110 Apps
 725 New to Domo
 85 Dojo
 Domopalooza
 1.1K 日本支部
 4 道場日本支部へようこそ
 29 お知らせ
 65 Kowaza
 301 仲間に相談
 662 ひらめき共有