I am sure this is possible (at least in most cases), but your workbook is not packaged, so the data is in a separate file on your computer somewhere and is not available. Can you save it as .twbx and re-post? This will package the data inside the workbook.
Generally speaking, Tableau does GROUP BY by default, every time your put that dimension on a sheet.
Counting instances is as easy as just dragging ID onto a sheet and selecting Aggregation - Count.
Conditional sum can be accomplished via calculated field, so instead of
sum(case when t.TranCode='D' then 1 else 0 end) as [TotalDeposits]
you would have something like