Forum Discussion

trndlnd's avatar
trndlnd
Frequent Visitor
1 year ago
Solved

Convert positive values to negative

Hi,

 

I have a column with both positive and negative values. I want Power BI to show all the valus as negative. How do I do that?

 

 

  • TomMartens's avatar
    TomMartens
    1 year ago

    Hey trndlnd ,

    then create a DAX measure like so:

    All negative (ms) = 
    SUMX( 'All Negative' , ABS( 'All Negative'[Value] ) * -1 )

    Regards,

    Tom

4 Replies

  • Hey trndlnd ,

     

    you can use PowerQuery to create a custom column like so:

    the formula:

    Number.Abs([Value]) * -1

    The table will look like this

     

    Hopefully, this provides what you are looking for.

    Regards,

    Tom

    • TomMartens's avatar
      TomMartens
      Super User

      Hey trndlnd ,

      then create a DAX measure like so:

      All negative (ms) = 
      SUMX( 'All Negative' , ABS( 'All Negative'[Value] ) * -1 )

      Regards,

      Tom

    • trndlnd's avatar
      trndlnd
      Frequent Visitor

      Sounds like this would solve my problem, but I am in DirectQuery mode, so PBI won't let me create a custom column like this.