Convert Negative sign to Parentheses in Pivot

Comments

5 comments

  • Avatar
    shilpa

    I added this code to the widget . But seems not working. I still have the same -ve numbers

    0
    Comment actions Permalink
  • Avatar
    Ido Darnell

    Hi Shilpa

    Did you make sure to change the index of the column you're looking to format? There's one line that you may need to edit in order to get it to work in your environment.  The '2' in _.each($('td:nth-child(2) div' , e) refers to the column of the pivot chart that we are trying to format. Change this to the appropriate column number.

    0
    Comment actions Permalink
  • Avatar
    shilpa

    Yes . I did change that

    0
    Comment actions Permalink
  • Avatar
    Laszlo Nagy

    Thank you for the great script!

    I extended it further for the case when a pivot table has multiple numeric columns, by adding a for loop.As in the example above the starting and ending values of the loop must be adapted depending on the starting and ending columns.




    format_negatives_multiple_columns.js
    1
    Comment actions Permalink
  • Avatar
    David Rogers

    This worked well for me.  Thank you.

    0
    Comment actions Permalink

Please sign in to leave a comment.