Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

loading negative nrs into a field is not working

hi guys,

I have a filed in the database that contain possitive and negative nrs as follow:

USP

(50)

(20)

(3)

5

8

10

the negative values on the database have () to recognize them but it seems that Qv is not recognizing them as Negative values.

Anyway I can fix that and make the qvw recognize the negative nrs.

Thxs,

Alec

1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like this,

=if(FindOneOf(UPS,'()'), PurgeChar(UPS,'()')*-1),UPS)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

5 Replies
MayilVahanan

Hi

Try like this,

=if(FindOneOf(UPS,'()'), PurgeChar(UPS,'()')*-1),UPS)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
swuehl
MVP
MVP

You probably need to tell QV how to interprete the negative format:

num#('(50)','#;(#)')

should read the '(50)' in as negative number. So try

LOAD

num#(USP,'#;(#)') as USP

FROM Table;

Regards,

Stefan

alec1982
Specialist II
Specialist II
Author

Hi Stefan,

Using this method I am getting wrong nrs and when I do Sum(USP) I get 0 which should not be.

Thxs,

swuehl
MVP
MVP

Hi Alec,

seems to work for me, please check attached.

Stefan

alec1982
Specialist II
Specialist II
Author

hi,

thank you for your help.

it works in your example but not sure why it is not working on mine.

The solution provided by Mayil is working as required.

Thxs,