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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Positive and Negative values

See attached, How do i fabs the negative data and negate the positive data?

12 Replies
Not applicable
Author

I have a field pulled from the database, having both -/+ values. How do i change these values at the backend sure that the negative becomes positive and the positive values become negative?

sunny_talwar

For backend, you can do like this:

LOAD FieldName * -1 as FieldName

...

swuehl
MVP
MVP

Sorry, still missing something here.

You want to do what exactly at the backend? Could you please elaborate your requirements, like describing what your exact expected result is using your sample data you posted above.

Seems like no is just a record number, so

=Sum( Aggr(-Sum(Data), no))


should equal


=Sum(-Data)


and if you want to do it at the backend, just use what Sunny provided, though I am not sure what you really want here.


Have a nice evening,

Stefan