Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Growth formula

I have standard formula: 

 

=[$(=$(lTranslation(132,YOY $ vs FxLY)))]

/[$(=$(lTranslation(65,FxLY Sales)))]

which does the trick for positive growth but what if FxLY sales are negative and YOY positive?

how would you write something like this:

if FxLY is negative than calculate =(B1-B2)/ABS(B2) otherwise =[$(=$(lTranslation(132,YOY $ vs FxLY)))]/[$(=$(lTranslation(65,FxLY Sales)))]

7 Replies
Not applicable
Author

anyone?

Anonymous
Not applicable
Author

Can't you just put fabs() around your denominator?

Not applicable
Author

=[$(=$(lTranslation(132,YOY $ vs FxLY)))]

/([$(=$(lTranslation(65,FxLY Sales)))])

like the above? it didnt work.

Not applicable
Author

just to make sure what i am looking for:

how would you write something like this:

if FxLY is negative than calculate =(B1-B2)/ABS(B2) otherwise =[$(=$(lTranslation(132,YOY $ vs FxLY)))]/[$(=$(lTranslation(65,FxLY Sales)))]

where B1 =[$(=$(lTranslation(132,YOY $ vs FxLY)))]

and B2 = [$(=$(lTranslation(65,FxLY Sales)))]

Anonymous
Not applicable
Author

I mean like this

=[$(=$(lTranslation(132,YOY $ vs FxLY)))]

/FABS(([$(=$(lTranslation(65,FxLY Sales)))]))

sunny_talwar

What is FxLY here? and what is B1, B2 here? are these all field names?

Not applicable
Author

it worked.  thank you.