Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Padding and char conversion in qlikview

Just a clarification are the two statements allowed in qlikview?

TO_CHAR("GTS_SHORT_IBT")

If (RPAD("REPORTTYPE", 4) = 'PAID' , 'MDR PAID')

thanks in advance

2 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

I've never seen them but check the F1 help. What are you trying to do? There's probably another function that will suit...

Anonymous
Not applicable
Author

To convert to text you can use TEXT function. TEXT(GTS_SHORT_IBT)

And you can use repeat function to have your values padded :

LPAD :

REPEAT('0', (10 - LEN(MYVALUE))) & MYVALUE AS NEWFIELD

RPAD :

MYVALUE & REPEAT('0', (10 - LEN(MYVALUE))) AS NEWFIELD

Change '0' to the character you want to padd with. And change the number 10 with your field's max length.

I hope this helps!

Regards

MultiView