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?

1 Solution

Accepted Solutions
sunny_talwar

For backend, you can do like this:

LOAD FieldName * -1 as FieldName

...

View solution in original post

12 Replies
swuehl
MVP
MVP

Not sure I understand, are you looking for

=Sum(-Data)

?

sunny_talwar

May be multiply by -1

Sum(Data) * -1

Not applicable
Author

No, See the table. I wanna change negative values to positive and change positive to negative

Not applicable
Author

No Sunny, I wanna change positive values to negative why negative to positive

sunny_talwar

That's what this is doing. When the sum is positive, it will make it negative and when it is negative, it will make is positive

martinpohl
Partner - Master
Partner - Master

I don't what the problem is with sum(-Data)

It will change positive values to negative and negatives to positive

Not applicable
Author

See attached:

I have a field called Data. It has both Negative and Positive values. I want to make the positive values negative why the Negative values positive. Clear?

swuehl
MVP
MVP

So it's about grouping the data, then reversing the sign?

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

edit: No, it's not clear what you are asking for without knowing your requested result (AKA what you expect to see).

Not applicable
Author

I want to do this at the backend not on the chart