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

Correcting the Decimal Value in script

Hi,

I am loading data from two different tables but amount value are not matching after decimals for same documents ,I want to match these table and eliminate duplicate. Since Amount flied are not same I am unable identify duplicates .Can anyone help to correct Decimals values.

I have tried Num(Num#( '[Amount ]'),'#,###.##')) and Num(Num#( '[Amount in LC_DMBTR]'),'#,###.00')) but its not working

Table 1

DocAmount
1900.00
21000.5
3100.55
4200

Table 2

DocAmount
1900
21000.50
3100.55
4200.00
2 Replies
swuehl
MVP
MVP

Just using

Set DecimalSep = '.';

T

able1:

LOAD * INLINE [

Doc,    Amount

1,    900.00

2,    1000.5

3,    100.55

4,    200

];

LOAD * INLINE [

Doc,    Amount

1,    900

2,    1000.50

3,    100.55

4    ,200.00

];

resulted in matching records in my setting.

But matching floating point values is not a trivial task. You may want to consider using round() or something like this (floor(), ceil() etc.) to define a common number base.

Not applicable
Author

Its not working ,I have tried floor(), ceil() also