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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Format Issues with Numbers

I got a very basic question but cannot make it work

Got two tables I want to joint

In both I have "Invoice Amount" but Table A : Comes from a systems and Values are like “-411,35” while fromm system B Values are like “411.35”

What is the script to make 411.35 be “-411,35”

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Replace(Replace(InvoiceAmt,'-',''),',','.')

View solution in original post

8 Replies
anbu1984
Master III
Master III

Replace(Replace(InvoiceAmt,'-',''),',','.')

Not applicable
Author

Amazing...Thanks a lot Anbun

suresh_rawat
Creator II
Creator II

Hi,

Use this Expression.

='-' & Replace(Value,'.',',')

It will work for you.

Regards

Suresh

anbu1984
Master III
Master III

Please close the post, if your queries are answered

Not applicable
Author

use

=replace(num('411.35','#,##0.00')*-1,'.',','):

or use just replace and then set  the number format from the Number Tab in charts.

its_anandrjs
Champion III
Champion III

Try this way also

Load

FABS( InvoiceAmt ) AS InvoiceAmt

From Location;

Or

Load

IF ( InvoiceAmt < 0,  Num( InvoiceAmt * -1,'#,##0.00') ), Num( InvoiceAmt,'#,##0.00') ) AS InvoiceAmt

From Location;

Regards

Anand

Not applicable
Author

I checked once again and it works only for Debit values i.e: 411.35 be “-411,35” but not when I got Credit Values

-411.35 be “411,35” so I need some kind of If Function as well

anbu1984
Master III
Master III

Load If(InvoiceAmt Like '-*',Replace(Replace(InvoiceAmt,'-',''),',','.'),'-' & Replace(InvoiceAmt,',','.')) Inline [

InvoiceAmt

"-411,35"

"411,35" ];