Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

make dimension value numeric

Hi experts

I have this expression in the script:

if([Reports]<0, [Reports]*(-1), [Reports]) as [Reports]

All of them have a numeric value. I need to change negative values, e.g. -130 into positive value, here 130.

The above expression is not working it is ignoring the *(-1).

Thank you for any help!

Labels (6)
2 Replies
steeefan
Luminary
Luminary

What about Fabs(Report) AS Report?

Or
MVP
MVP

In addition to using Fabs() as suggested already, you'll want to confirm that Reports is being read as a numeric field. If it isn't, you'll likely need to num#() it.