cancel
Showing results for 
Search instead for 
Did you mean: 

How to create the filter to read from actual cube and write to plan cube

Former Member
0 Kudos

Hi,

I am using Integration Planning fox formula.

If I want to based on the plan cube using FOREACH 0FISCPER to get the Actual Cube's keyfigure and do some calculation then write to plan Cube. How can I use the filter for infoprovider? Should I put Plan Cube in the filter or Actual Cube in the filter, or both in the filter?

Thanks!

Dongkai

Accepted Solutions (1)

Accepted Solutions (1)

cornelia_lezoch
Active Contributor
0 Kudos

Hi,

if in the beginning you have only data in actual cube and no data in plan cube and you want to use a foreach command, then you have to put actual and plan cube into the filter.

That is because:

1) you have to have that cube in the filter where you want to write into

2) you have to have the data records to be read according to the filter, whith which you want to run a calculation

3) with formulas you usually need at least one data record to "drive" your formula to start a calculation. if no data recordds are read, then nothing can be calculated

regards

Cornelia

Former Member
0 Kudos

Hi Cornelia,

Thanks very much for your feedback!

I put both P_cube and A_cube both in the filter, then use foreach 0FISCPER, the error occured. the error message just say "xxxx ended with errors" which is useless.

Then I check the data in the cube, below is the detail:

P_cube has KF1,KF2,KF3. Based on my filter(fiscper = 38) there is one record while all 3 kifgure are 0.

A_cube has KF1,KF4,KF5,KF6..... based on my filter(fiscper = 38) there are 1 record and the kifgure has number.

My logic is using A_Cube's KF1 and KF4 to calculate and put back to P_Cube's KF2.

Below is my research.

1. If I only put P_Cube in filter, use foreach 0FISCPER, the foreach will not run because in fiscper 38 all of the Keyfigure are 0. It looks like in query it delete all 0 rows. So in debug mode the loop is empty.

2. If I put P_Cube and A_Cube in filter, there is 1 record in loop, while when write back to cube, the error occured. I guess it is because P_Cube still not ready due to all keyfigure are 0.

Not sure in my case, should I use Foreach in Refdata or Foreach in Selection?

Thanks!

Dongkai

cornelia_lezoch
Active Contributor
0 Kudos

Hi Dongkai,

If an error message occureed, you either have an error in your formula - you can easily make a check in the formula editor.

Or your calculation does somethings strange like divide by 0.

or the system can not write the data record in the way you defined it.

can you put the full formula code in here?

regards

Cornelia

cornelia_lezoch
Active Contributor
0 Kudos

ah and I forgot

the foreach refdata could work, but only if there is at least one data record read by your filter and afterwards you can do the foreach.

foreach in selection could be worth a try if all your fiscper are in the selection of your filter.

regards

Cornelia

Answers (0)