2 Replies Latest reply on May 10, 2018 5:01 AM by Zhouyi Zhang

# out of a long number I would like to only show the last four numbers

I have data that has a 10 digit number but I would like to only show the last four digits because I have another data source that only has the last four digits and I would like to match them.

2001003581 = 3581

Thanks,

Michael.

• ###### 1. Re: out of a long number I would like to only show the last four numbers

Hi Michael

You haven't given us a lot of information about the actual data but I will assume that the [long number] is an actual number (not a string) and is an integer that  needs to be aggregated

and that the number to be compared is an actual number also

sum[long number]%10000       will return the last 4 digits of the long number as a number that can be compared to your target number

sum[long number]%10000 = sum[target]

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: out of a long number I would like to only show the last four numbers

Hi, Michael

If just for matching purpose, you can create a calculation like  Int(right( Str([long number]),4))

Hope this helps

ZZ