1 Reply Latest reply on May 29, 2014 9:36 AM by Zac Hilbert

    How do I change a value in a database record?

    Phil Ingram

      I am connecting to an accounting database.  For any records for a specific account, I want to change the balance value from a positive to a negative.  I don't think I can use a calculated field because I want to use the "balance value" field in my charts, but just want the values associated with a specific account to be negative instead of positive.  Any suggestions are greatly appreciated!  Thank you!


      I've attached a file as an example database.  In this example, I'd like to change any monthly balance for account 3000 from positive to negative.  Thanks.

        • 1. Re: How do I change a value in a database record?
          Zac Hilbert

          Not knowing what your data looks like, it's hard to fully answer your question; I'd recommend posting a packaged workbook.  However, I do not see why a calculated field wouldn't work. Have you tried something like:


          if [Account Num] = 123456 then abs([Account Value]) * -1 else [Account Value] end


          Then you use that calculated field instead of your database field.


          And, as an aside, it seems odd that you want to selectively negate certain values based on account number. Perhaps a better solution exists upstream of Tableau.