Forum Discussion
mloc1990
6 years agoHelper I
% 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...
- 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
Nathaniel_C
6 years agoCommunity Champion
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
- mloc19906 years agoHelper I
Hi Nathaniel_C
This works great thanks for your help! I changed my formula a bit to the below and it appears to be doing what I need it too.
% diff 30 days ago = IF(X<0 && Y<0 && X<Y,-1* iferror(X/Y,0)+1,iferror(X/Y,0)-1)Thanks!