# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Partner

## Transfer 50% of the value from one side to the other

Hello friends, thanks for your time.

I'm having an problem.

I need to move 50% of the value that every CC have( Column CC ORIGEM) to the corresponding one CR (Column CC DESTINO).  What's your advice?

Again, Thanks

7 Replies
New Contributor II

## Re: Transfer 50% of the value from one side to the other

If I understand correctly then you should do

mid(CCORIGEM,1,5)& mid(CCDESTINO,6, len(CCDESTINO)-6)

or

replace(CCDESTINO,'230CR','224CC')

Partner

## Re: Transfer 50% of the value from one side to the other

Maybe my question isnt complete.

I have another table with the field CC  ( that Match with the both columns CCORIGEM and CCDESTINO) with the amount.

Imagine that example,

The 224CC9000 has the ammount of 500, what I need is that half of that amount (225) be transferred to 230CR2000 and so on.

New Contributor II

## Re: Transfer 50% of the value from one side to the other

Sorry, I still dont understand what you want.

Can you make me example.

like column(1) + column(2) = result

Support

## Re: Transfer 50% of the value from one side to the other

Did you get things sorted out, or are you still trying to find a solution?  If you did come up with something, please post that solution, so others on the community can learn from that.  You can write that up and then use the Accept as Solution button to mark it as what you did etc.

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Partner

## Re: Transfer 50% of the value from one side to the other

I'm still struggling to find an way to do this.

Basically, i have the principal table that have all the information and i want to cross that main table with that little table with the CC_origem and the CC_destino.

I can't figure out waht to do.

Support

## Re: Transfer 50% of the value from one side to the other

It will likely help if you can attach a sample app or a subset of what you have etc., as sometimes folks need to be able to see the data model and stuff in order to figure out what the right answer is...

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Contributor III

## Re: Transfer 50% of the value from one side to the other

if I understand correct then you have a field lets say A which has 'n' values and you want to create a new table with B and C fields, and each of them will have n/2 randomly allocated values? I don't know why you want to do this but I can think of a way

Table1:

Table 2: