cancel
Showing results for 
Search instead for 
Did you mean: 

Update Rules

Former Member
0 Kudos

Hello Guys,

I'm uploading information from one cube to another and the as follow:

data to be uploaded

ZXX 10 20

ZXX 20 40

as a result upload ZXX 30 60 which is correct, but I need to fill up a characteristics asking to the total 30 and 60, but I think that the routine at update rules is reading record by record. Is there any way to summarize the records first?

Regards,

Iván.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

i think u can create a dso and define the kf rule with 'add '

Former Member
0 Kudos

Hi Diego,

This is not the issue. My issue is that I need to fill up a characterictic based on the number (total of a key figure). For instance:

employee nº of delays

0001 4

0001 5

So I need to ask something like if nº of delays > 6 then....

as the datapackage is reading record by record I cant' get the desire assigment.

it should be something like 0001 9

the the if would work.

I hope you understand now.

Regards,

Iván.

dielom
Active Contributor
0 Kudos

Hi Ivan,

In the start routine you have the whole data package. So, you can create an internal table storing employee and number of delays and get those totals, it would be something like

- data_package has employee, number of delays and more data (I suppose).

- internal_table has employee and number of delays only.

loop at data_package into internal_table.

collect internal_table.

endloop.

Then, in internal_table you'll have 0001 and 9 if the input records are those you mention. And you can do whatever you want with them.

But even if this works, in the update rules you get records by packages, so you can have in the first package 0001 4 and in the second one 0001 5.

I guess you'll need to create an additional cube.

Or, you can provide the complete scenario (it's hard to understand your requirement with the information you provided).

Hope this helps.

Regards,

Diego

Former Member
0 Kudos

I think I can't use condition because it will work like a hierarchy. In terms of start routine when I'm readind the datapackage it is read one by one. Have any code help thta solve my issue?

Regards,

Iván.

dielom
Active Contributor
0 Kudos

Hi Ivan,

Now I understand your requirement. In the start routine you get all the records at once, not record by record, then you can loop at the data. The problem is that you get them by packages. So if your package is 50000 records, and you have 100000 records, you'll get 2 packages. Within each one of them you can acomplish what you need. But if you have ZXX in both, you won't get what you need.

What you can do is create an update rule from your cube to itself and update that value only.

Hope this helps,

Regards,

Diego

Former Member
0 Kudos

You load the data in another cube as its i.e. ZXX 30 60

and in report you can filter out the records through conditions for total 30 and 60.

Hope this helps

Regards,

Mahendra.

Former Member
0 Kudos

Have you thought about using aggregates on the data target ? You can read about cumulative key figures too on the forum.

Edited by: BG on May 7, 2008 2:10 PM

dielom
Active Contributor
0 Kudos

Hi Ivan,

You can create a start routine in the Update rules to summarize the values.

Why do you want to do this? This same processing is made when you update the cube, so you don't need to do that. You'll get 1 record in the cube with or without this summarization.

Hope this helps.

Regards,

Diego