Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
NemoAndStitch22
Contributor III
Contributor III

Number Load Format

Hiya, 

 

Might be a really simple answer but I can't find anything when I google..

I have a text file that I'm loading in and for some reason the numbers are formatted in brackets for negatives which are then being ignored as they aren't numbers in qlik...

 

Does anyone know the formula/how to change them to negatives when loading in? 

I've tried Num/Num#/replace but I can't get anything to work.

 

Thanks!!!

Labels (1)
1 Solution

Accepted Solutions
NemoAndStitch22
Contributor III
Contributor III
Author

That just made everything negative.. I've got a mix of positives, think I've found an answer:

num#(Replace(Replace([field], '(', '-'), ')', '')) as [field],

View solution in original post

4 Replies
PrashantSangle

Check evaluate ()

https://help.qlik.com/en-US/qlikview/May2024/Subsystems/Client/Content/QV_QlikView/Scripting/StringF...

 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
NemoAndStitch22
Contributor III
Contributor III
Author

That's just removing the brackets and making everything positive.. Not keeping them as negatives?

marcus_sommer

You may try: alt(Field, purgechar(Field, '()') * -1)

NemoAndStitch22
Contributor III
Contributor III
Author

That just made everything negative.. I've got a mix of positives, think I've found an answer:

num#(Replace(Replace([field], '(', '-'), ')', '')) as [field],