Forum Discussion

jcarrier's avatar
jcarrier
Helper I
9 years ago
Solved

Pivot Table - Subtotals - Custom Calculations

I'm having a challenge with pivot table subtotal custom calculations.   For example, given a Profit and Loss, all values would show as positive and it would flow as shown below.  This is for a Data M...
  • Anonymous's avatar
    Anonymous
    8 years ago

    jcarrier,

    Directly create the following measure.

    ADJ = ABS(SUM('Table '[Balance]))


    Regards,
    Lydia

  • jcarrier's avatar
    jcarrier
    8 years ago

    Hi Lydia -

     

    Happy to mark as solved, my point was that ABS works completely differently in Excel than DAX so the outcome is quite unexpected.  If you use absolute value in Excel the subtotals would be impacted by the absolute value formula itself.  Yet, in DAX measures, ABS seems to allow expression of +/- values to all display as positive yet the subtotals themselves obey the original sign values.  That is quite unexpected indeed, and it's extremely powerful too.  Thanks again.

     

    jcarrier