Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: 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
Luminary Alumni
Luminary Alumni

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