Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Adding numbers to an scheme account.

Hi guys,

I got stuck in one scheme account's problem. Maybe someone could know easily how to do the following:

I have the following table with the number of the scheme account, the number of the account, and a flag which indicates if the account number has the maximum digits (in this case 7, but is completely dynamic).

error loading image

I want to create another table with the number of accounts which hasn't the max_length, and I want to add to them as many '0' (for minimum value) and as many '9' (for maximum value) as it would be necessary.

I did it in a static way :

Cuentas_Mayor5 :

load distinct

N_Fila as N_Fila2,

N_Fila_Cuenta&'0000' as N_Fila_Cuenta_Min,

N_Fila_Cuenta&'9999' as N_Fila_Cuenta_Max

resident Cuentas_Mayor4 where (Max_Length_Cuenta = 0);

And I got the desired result in the following table :

error loading image

I have in a variable the value of the maxLength. The point to do this is easy, it's just add as many '0' as the result of maxLength - len(currentCount), but I don't know how to do it in Qlikview.

Any help would be appreciated.

Thank you.

Cheers!!

1 Solution

Accepted Solutions
Highlighted
Not applicable

Hi,

Here you are a possible solution.

I hope it helps you.

Regards.

View solution in original post

2 Replies
Highlighted
Not applicable

Hi,

Here you are a possible solution.

I hope it helps you.

Regards.

View solution in original post

Highlighted
Partner
Partner

Muchas Gracias Miguel.

It was exactly what I was looking for : the function repeat ('something', 'n-times').

Very easy if you know exacty which function fits on your problem.

Thank you very much.

See you around!