Forum Discussion

andrewwglenn's avatar
andrewwglenn
Helper I
5 years ago
Solved

Grand Total / Absolute Value Error

I have a table that has 2 columns: starting distance and ending distance

My goal is to create a measure that subtracts SUM(ending distance - starting distance), as: A

I would like to create a measure that computes ABS(A), as: B

Power BI seems to handle rendering B well line-by-line, but the grand total is merely the absolute value of SUM(A), rather than SUM(ABS(A))

 

How can I resolve this?

4 Replies

  • andrewwglenn maybe try this

     

    SUMX ( Table, ABS([A] ) 

     

    if it doesn't work share sample data and expected output.

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • andrewwglenn's avatar
      andrewwglenn
      Helper I

      Link to Excel and Power BI Files 

      I couldn't figure out how to produce a correct solution. My goal is to have the absolute values added together as the grand total, but it currently performs the absolute value on the reference field as the total.

       

      Thanks.

  • andrewwglenn solution attached, all the measure start with sum

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.