Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

Number format

Hi all,

How to convert the following amount into two decimal correct number format ?

suppose  I have number as 153,050.00 (something like 1,53,050.00)

Regards,

mahamed

21 Replies
sunny_talwar

I agree, but do you think there is another way to do this (may be changing or setting some environmental variables)? Wouldn't Qlik know that there is another number format available which might be used?

Mahamed_Qlik
Specialist
Specialist
Author

Hi Sunny,

Num(FieldName, '#,##,##0.00') this is working but what happens is


it is automatically adding .00 to each value

For example if my amount is like 153,050 then  it should show as 1,530.50 but it is showing as 153,050.00


Kindly advise

Mahamed_Qlik
Specialist
Specialist
Author

Hi Amit,

It is my dimension value not measure.

sunny_talwar

I guess try it like this then:

Num(FieldName, '#,##,##,##,##,##,###')


Capture.PNG

Mahamed_Qlik
Specialist
Specialist
Author

What if I will need  upto two decimal ?

ThornOfCrowns
Specialist II
Specialist II

13 digits gives you 10,00,00,00,00,000 = one lakh crore / ten kharab / one thousand arab = One trillion

That should be enough to be getting on with!

sunny_talwar

In the above example I see two decimal showing up, Isn't that what you want?

Mahamed_Qlik
Specialist
Specialist
Author

Well sunny,

I will tell the actual issue is detail.

I have one dimension named as GBPRateAmount.

153.20

14.364

1,123.645

246,200.9687

So, I want the result should be like below

153.20

14.36

1,123.64

2,46,200.96

Now tell me

Regards,

Mahamed.

Mahamed_Qlik
Specialist
Specialist
Author

And here is the script

SET ThousandSep='.';

  SET DecimalSep=',';

  SET MoneyThousandSep='.';

  //SET MoneyDecimalSep=',';

  SET MoneyDecimalSep='.';

  SET MoneyFormat='€ #.##0,00;€ -#.##0,00';

  SET TimeFormat='h:mm:ss';

  SET DateFormat='DD-MM-YYYY';

  SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';

  SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

  SET DayNames='Mo;Tu;We;Th;Fr;Sa;Su';

  SET HidePrefix = '_';

sunny_talwar

May be this:

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep='.';

//SET MoneyDecimalSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='€ #.##0,00;€ -#.##0,00';

SET TimeFormat='h:mm:ss';

SET DateFormat='DD-MM-YYYY';

SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mo;Tu;We;Th;Fr;Sa;Su';

SET HidePrefix = '_';

Table:

LOAD *,

  Num(GBPRateAmount, '#,##,##,##,##,##,###.##') as NewField;

LOAD * Inline [

GBPRateAmount

153.20

14.364

1123.645

246200.9687

];

Capture.PNG