Valerine Tng Posted October 12, 2020 Posted October 12, 2020 Hi, Let say I have this table, I want to calculate the profit in each period (i.e Revenue- Expense = Profit for period 1, 2, 3) How do I use custom expression to achieve that Description Period Activity Revenue 1 100 Expense 1 50 Revenue 2 200 Expense 2 100 Revenue 3 300 Expense 3 200
Fabian Duerr Posted October 13, 2020 Posted October 13, 2020 Option 1: Get the Profit in the same table Here you could use this calculated column: First(If([Description]="Revenue",[Activity],NULL)) OVER ([Period]) - First(If([Description]="Expense",[Activity],NULL)) OVER ([Period]) Option 2: Get your data to the right shape Create a new data table with a Pivot operation and then simply subtract the columns: [Revenue] - [Expense]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now