Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NickP_DF
Creator II
Creator II

A strange number formatting

Hello guys,

I need to convert a number into a 6-chars string keeping it on the right and filling the left side with blanks, so the number 12345 must be converted into ' 12345'...the number 1 into '     1'.

Is there a function to simply do it or have I to invent something never seen 'till today? 😁

Many thanks.

N.

1 Solution

Accepted Solutions
NickP_DF
Creator II
Creator II
Author

Repeat(' ',6-Len(Text(num))) & num

N.

View solution in original post

4 Replies
NickP_DF
Creator II
Creator II
Author

Repeat(' ',6-Len(Text(num))) & num

N.

Brett_Bleess
Former Employee
Former Employee

Hey Nick, I am going to mark the post with the expression as the solution, as I think that is what you were say, please correct me if I am wrong in that assumption, thanks for posting it!  You should be able to mark it yourself, just FYI, after you do the post, you can still use the Accept as Solution button on it to mark it for future reference.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
NickP_DF
Creator II
Creator II
Author

Hi Brett,

your assumption is right...I know the use of the "Accept as solution" button; I didn't use it because it seemed a bit strange  to me to post the question, the reply and auto-mark my solution as the right one!

Thank you so much.

N.

Brett_Bleess
Former Employee
Former Employee

Yeah, no worries, marking things lets folks know what actually worked, so do not hesitate to mark you own if you are explaining what you did to get things working...  Thanks for the follow-up, much appreciated!

Cheers,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.