Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Num vs num #

Hi all,

Can you please tell me difference between num and num#.

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Say, you have a resultant number 5555.1234567 and your user wants to see only till two decimals. Here num() helps you - Num(5555.1234567, '##0.##') -> 5555.12    and the backgound number remains as it is.

You get a sting which is aaa12234, and your user asks to get the number part only. You can use num#() -

=Num(Num#(aaa12234, 'aaa#####')) -> 12234

View solution in original post

9 Replies
Anonymous
Not applicable

tresesco
MVP
MVP

Num() - changes format only (without making any change in the original backend data)

Num#()  - parses/reads the data according to mentioned format.

See the examples from help.

its_anandrjs

The definition from the help

Num Definition

The num function formats the expression numerically according to the string given as format-code. Decimal separator and thousands separator can be set as third and fourth parameters. If the parameters 2-4 are omitted, the number format settings that have been specified with the Number Interpretation Variables are used in first hand, in second hand the operating system number format settings are used if number interpretation variables have not been set.

Num# Definition

The num# function evaluates the expression numerically according to the string given as format-code. Decimal separator and thousands separator can be set as third and fourth parameters. If the parameters 2-4 are omitted, the default number format set by script variables or in the operating system is used.

deepakqlikview_123
Specialist
Specialist
Author

Can u plz give me some example for use of both.

Thanks

its_anandrjs

Very simple example Suppose you have a string abc123 and you want to convert it into number then you have to use NUM#

Eg:-

=Num#('abc123', '#,##0.##', '.' , ',' ) //this gives you abc123 but if sam you use with Num it will not convert this into number

In the same if you want to get only numbers to be extract from same then first you have to use Num# then Num

=NUM( Num#('abc123,4', 'abc#,#') ,'####') // this will gives only 1234

Same for Num but here i am format my given number like i have numbers 123 and i want to format it as 123.00 then is use Num because it is already in number but i want to format it

Eg:-

=Num('123', '#,##0.##')  //This will gives 123.00 and so many formats you can use

tresesco
MVP
MVP

Say, you have a resultant number 5555.1234567 and your user wants to see only till two decimals. Here num() helps you - Num(5555.1234567, '##0.##') -> 5555.12    and the backgound number remains as it is.

You get a sting which is aaa12234, and your user asks to get the number part only. You can use num#() -

=Num(Num#(aaa12234, 'aaa#####')) -> 12234

deepakqlikview_123
Specialist
Specialist
Author

Thanks Tresco and Anand, that is very helpful for me .

Not applicable

Hi,

In simple words,

Num# can be considered as 'Taking In'

Num can be considered as 'Giving out'

Eg. '10.222222'

Num#('10.222222','##.######') => 10.222222

Num('10.222222','##.##') => 10.22

Regards,

Priyanka

deepakqlikview_123
Specialist
Specialist
Author

Thanks Priyanka