Forum Discussion

joe231's avatar
joe231
Frequent Visitor
4 years ago
Solved

HELP with Negative Return Values

Hi All -   in a measure column, I am Trying to calculate %difference between 2 columns (Result 1 column) that results into Negative values. I want the negative values to positive and keep the posit...
  • Adescrit's avatar
    4 years ago

    Hi joe231 ,

     

    How about this:

    % Difference = 
    VAR __Measure_Value = Data[Result2] 
    VAR __Baseline_Value = Data[Result1]
    VAR __Calculation = DIVIDE( __Measure_Value - __Baseline_Value , __Baseline_Value )
    RETURN
        IF( __Calculation < 0, __Calculation * -1, __Calculation )