Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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.