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
 10.6K All Categories
 APAC User Group
 12 Welcome
 36 Domo News
 9.6K Using Domo
 1.9K Dataflows
 2.4K Card Building
 2.2K Ideas Exchange
 1.2K Connectors
 339 Workbench
 251 Domo Best Practices
 11 Domo Certification
 461 Domo Developer
 47 Domo Everywhere
 100 Apps
 703 New to Domo
 84 Dojo
 Domopalooza
 1.1K 日本支部
 4 道場日本支部へようこそ
 22 お知らせ
 62 Kowaza
 296 仲間に相談
 649 ひらめき共有