Categories
- All Categories
- 146 Oracle Analytics News
- 27 Oracle Analytics Videos
- 14.7K Oracle Analytics Forums
- 5.7K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 54 Oracle Analytics Trainings
- 12 Oracle Analytics Data Visualizations Challenge
- 4 Oracle Analytics Career
- 2 Oracle Analytics Industry
- Find Partners
- For Partners
function absolute in calculated item

Im trying to calculated the percentage difference between two columns using a calculated item ($2-$1)/$2 but it fails when both values are less than 0. Is there a way to apply absolute function? Documentation says yes but havent managed to make it work
Answers
-
Try like below
( ($2-$1)*1.00)/$2
0 -
3689512 wrote:... but it fails when both values are less than 0.
Can you define "fails" ?
Do you have an error? Do you have a wrong result? What kind of result? (post an example or screenshot maybe?)
0 -
didnt work gives the same result
0 -
Yeah because that's not how "absolute" works mathematically... "times 1.00" is a trick to prevent integer divisions and has nothing to do with absolute numbers.
0 -
the sign is wrong when both numbers are negative . E.g: -2-(-4)/-4. where -2>-4 so it's 50% higher not -50%
0 -
the sign is wrong when both numbers are negative . E.g: -2-(-4)/-4. where -2>-4 so it's 50% higher not -50%
0 -
Is there a specific reason why you use $ notation and not a real formula where you can use ABS?
0 -
what do you mean with @ notation? It's a calculated item not column. is there another way to do math operations in a calculated item?
0 -
I know it's a calc item. My point is: actual formulas are far more precise and with calc items it's easy to have something in $1 and $2 which isn't what you expect (influenced by prompts, filters, selections,........)
0 -
I dont know how to get the result i want using calculated column. My data is like this.
Where % Var is the calculated item. How can i create a new column with just the percentage difference between column Real and Plan
0