Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community
I have account no as below, how to make the account no '979987980000000' become a number, all the account no aligned to the right?
But if it is an account number, it would be better to treat it as a unique key instead of as a number. I would instead remove the numeric interpretation by wrapping it in the Text() function:
Text(AccountNo) as AccountNo
HIC
QlikView supports a maximum of 14 digits in your number. If it is longer than that, it will be interpreted a a text.
First, you can use evaluate() to convert your original text into a integer.Then, you can use NUM to format it appropriately
Try Below
num( EVALUATE(YourFieldName),'#0') AS YourFieldName
Try this
Evaluate(AccountNo) as N,
But if it is an account number, it would be better to treat it as a unique key instead of as a number. I would instead remove the numeric interpretation by wrapping it in the Text() function:
Text(AccountNo) as AccountNo
HIC
Hi,
Try Num(), otherwise you can align all the values to the right by changing
Properties -> Presentation -> Alignment -> Text and Numbers to Right
Hope this helps you.
Regards,
Jagan.
Can you elaborate more? Is there any advantage to store the account number as a text instead of num?
hi
try this
since NumFormat has capacity to display 14 digit number. more than 14 digit number show in text.
for this use it.
Evaluate(AccountNo) as AccountNo_new
I assume that AccountNo is an ID that you will use only as a key or selection field, and that you will never make any arithmetic calculations with it. If so, there are no longer any major advantages with having it as a number. (Except that a number takes less space in RAM than a string.)
Further, you have an account number that cannot be represented exactly as a number. You can use Evaluate() to assign a numeric value to it, but you will lose information. For instance, the following two account numbers will be assigned the same numeric value:
979987980000000000
979987980000000001
So, the advantage with storing it as text, is that you don't lose any information: The two account numbers above will still be two separate account numbers.
HIC
use text(AccountNo) as AccountNo