Forum Discussion

mloc1990's avatar
mloc1990
Helper I
6 years ago
Solved

% difference between 2 negative numbers is a positive when it should be negative

Hi,   I'm hoping someone can help me. I have the below calculated column that compares the current field X to the same field 30 days ago Y to get a % difference   % diff 30 days ago = iferror(ta...
  • Nathaniel_C's avatar
    6 years ago

    Hi mloc1990 ,

     

     

    % diff 30 days ago =IF(X<0 && Y<0 && X<Y,-1* iferror(table[X]/table[Y],0),iferror(table[X]/table[Y],0))

     

     

    I would also use DIVIDE(), but basically wrap in an IF().  
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel