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

postive and negative values

Hi im showing the postive and negative values for a particular column, I would like to reverse, which displaying, how can I do that

for eg: -97 should show 97

for eg: 100 should show as -100

im using qlikview 8.0 thanks

5 Replies
Anonymous
Not applicable
Author

just use_ "-sum(val1)" or "-field1"

all values will be reverted!

you might Change it in script also "-val1 as newval1" and use the new field

alexandros17
Partner - Champion III
Partner - Champion III

If your expression is something like

Sum(value)

then change it in

Sum(value) * -1

Let me know

pokassov
Specialist
Specialist

Hello

-eg

Not applicable
Author

Hi Rahim,

We can use the following expression.


if(sign(fieldname)=-1,fabs(fieldname),-1*fieldname)

Michiel_QV_Fan
Specialist
Specialist

Rahim,

just multiply the end result of your expression with -1. Be sure to enclose the full expression in ( ) and make the * -1 as final calculation outside the ( ).