If a Condition of a column is true, I want negative value in the amount column

I am trying to create an income/expense tracker.

Column 1 is,

Account type, where I select, "Income" or "Expense"

Column 2 is,

Amount, where I enter amount

Column 3 I have created a virtual column where it computes a new amount value (value should be positive, if its an income. or Value should be negative, if its an expense)

I am trying to use this formula in the virtual column, 

IF([Account] = "Expense", [Amount]*-1, [Amount])

The value in the virtual column remains positive. It does not become negative.

Solved Solved
0 7 529
2 ACCEPTED SOLUTIONS

Just to test this, what happens if you enter [Amount] * (-1)?

View solution in original post

I tried your suggestion, Value still remains Positive. 

I tried this formula, 

IF([Account] = "Expense", [Amount], [Amount]*-1)

For the above formula, now all the values (income and expense amount value) becomes negative.

 

View solution in original post

7 REPLIES 7

Just to test this, what happens if you enter [Amount] * (-1)?

I tried your suggestion, Value still remains Positive. 

I tried this formula, 

IF([Account] = "Expense", [Amount], [Amount]*-1)

For the above formula, now all the values (income and expense amount value) becomes negative.

 

diyorapiyush_0-1656911985487.pngdiyorapiyush_1-1656912018797.png

Here is the screen shot

Just to make sure, the key of the table that Account column refers to are "Income" and "Expense" and not some id numbers like UNIQUEID(), correct?

Does not make sense at all to me.....

Account column is a ref column. Wait I will check data sheet. I think
account column in the sheet might have another value.

If the ID of the table the account column refers doesn't contain 'Expense' then that would explain why all of the amounts are coming out negative

Top Labels in this Space