I want to calculate profit when cost and revenue are in the same column. For example:
item account_category balance
x cost 5
x cost 5
x revenue 12
y cost 8
y revenue 7
So, in Tableau, I'd like to have calculation that gives me profit both in terms of absolute dollars (i.e., revenue
- cost
) and percentage of revenue (i.e., (revenue
- cost
)/ revenue
). I'd then like to slice / dice by columns like item
.
I'm not even sure where to start; I've tried table calculations with no success.
12-5 and 7-8
and(12-5)/12 and (7-8)/7
... is that correct? – Siva(12-5-5)
and(7-8)
, then(12-5-5)/12
and(7-8)/7
...since its would be aggregated byitem
in this example. – Ryan Erwin