This Essbase discussion board is provided as a free service and dedicated to all the Essbase professionals out there!
 Return to Index  

Xref / Xwrite

January 5 2017 at 10:48 AM
No score for this post
Krishna 
from IP address 161.155.15.26

On 11.1.2.1, have 2 planning EPMA applications.

Common Dimensions
Year
Scenario
Version
Entity
Dept
Accounts

Dimension only in Expense cube (target)
Projects

Dimension only in PayExp cube (source)
Employee

PayExp cube has an account (Acct_project, type smartlist) to indicate which project an employee is working on, in any month. The smartlist in this cube is same as level0 members of Projects dimension in the target cube.
Most of the employees of only one Entity (Ent1) have assigned projects. For the rest of the employees it is none.

Based on the project an employee is working his expenses/metrics should go to the corresponding project in the target cube. If Acct_project is missing, it needs to go to Project_None.

In target cube, Level0 members of Projects dimension are : Project_10, Project_20, Project_30 etc.
In Source cube, Smartlist Ids of Acct_project are 10,20,30 etc.

The following script is giving inconsistent results. any thoughts? In logs on the target app, is there a way to see which intersection xref / xwrite are using.

Set Updatecalc OFF; Set Cache HIGH; Set Aggmissg ON;
SET MSG DETAIL;

Fix(FY17,working,dept1,dept2, Ent1)
fix( Sam, Joe, violet, HDManager)
fix(jan:Mar)

var varTmpData ;

forecast (
If ("FTEManager" <> #missing) /* to execute only for valid emp, dept, ent */
if ( Acct_project <> #missing )
varTmpData = @XREF( "ExpCube", @CONCATENATE("Project_",@HspNumToString (Acct_project) ));
@XWRITE(varTmpData + forecast, "ExpCube", @CONCATENATE("Project_",@HspNumToString (Acct_project)));

else
varTmpData = @XREF( "ExpCube", Project_none );
@XWRITE( varTmpData + forecast , "ExpCube", Project_none);

Acct_project = 1000; /* just for testing */
endif
endif
)

Endfix
Endfix
EndFix

Source cube data

FY17 Forecast Working Ent1
Jan Feb Mar
Dept1 Sam FTEManager 1 1 1
HDManager 1 1 1
Acct_project - 10 10
Joe FTEManager 1 1 1
HDManager 1 1 1
Acct_project - 10 30
Dept2 Violet FTEManager 1 1 1
HDManager 1 1 1
Acct_project 20 10 10


Expected data intarget cube.
FY17 Forecast Working Ent1
Jan Feb Mar
Dept1 Project_None HDManager 2 - -
Project_10 HDManager - 2 1
Project_30 HDManager - - 1
Dept2 Project_10 HDManager - 1 1
Project_20 HDManager 1 - -

Thanks,
Krishna

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Responses

  1. Re: Xref / Xwrite - Krishna on Jan 5, 2017, 12:06 PM
    1. Break it down - Cameron Lackpour on Jan 5, 2017, 12:19 PM
      1. Re: Break it down - Javier on Jan 5, 2017, 3:35 PM
        1. Re: Break it down - Pete on Jan 5, 2017, 3:52 PM
          1. Re: Break it down - Javier on Jan 5, 2017, 4:15 PM
            1. Re: Break it down - Javier on Jan 5, 2017, 4:20 PM
              1. Sigh - Pete on Jan 5, 2017, 6:59 PM
                1. Actually! - Pete on Jan 5, 2017, 7:01 PM
          2. Call me Ned - Cameron Lackpour on Jan 5, 2017, 4:30 PM
            1. details - Krishna on Jan 6, 2017, 9:16 AM
              1. Any suggestions? - Krishna on Jan 9, 2017, 4:10 PM
                1. Re: Any suggestions? - Pete on Jan 9, 2017, 8:07 PM
     

RSS feed for this forum - http://www.network54.com/Forum/58296?xml=rss. Please email hypess (at) gmail.com, if you have any questions/feedback/issues.